add step to check if docker file changed

This commit is contained in:
Luke Robles 2024-11-13 11:44:24 -08:00
parent 0ace86fe49
commit 2956a7a556

View File

@ -32,6 +32,8 @@ jobs:
filters: |
python_files:
- 'app/**/*.py'
docker_file:
- 'Dockerfile'
- name: install UV
run: |
pip install uv --quiet
@ -43,7 +45,7 @@ jobs:
if: steps.filter.outputs.python_files == 'true'
Build-and-Push-Docker:
needs: [changes, Lint-Python]
if: ${{ needs.changes.outputs.python_files == 'true' }}
if: ${{ needs.changes.outputs.python_files == 'true' || needs.changes.outputs.docker_file == 'true' }}
steps:
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
@ -64,7 +66,7 @@ jobs:
ldooks/dragon-bot:${{ gitea.run_id }}
sync-argocd-app:
needs: [changes, Build-and-Push-Docker]
if: ${{ needs.changes.outputs.python_files == 'true' }}
if: ${{ needs.Build-and-Push-Docker.result == 'success' }}
steps:
- name: Sync app in ArgoCD
uses: clowdhaus/argo-cd-action/@main
@ -74,7 +76,7 @@ jobs:
options: --insecure --server 192.168.1.205 --auth-token ${{ secrets.ARGOCD_TOKEN }} set dragon-bot --helm-set image.tag=${{ gitea.run_id }}
post-status-to-discord:
needs: [changes, Build-and-Push-Docker]
if: ${{ needs.changes.outputs.python_files == 'true' }}
if: ${{ needs.Build-and-Push-Docker.result == 'success' }}
steps:
- name: Post status to discord
if: github.event_name != 'pull_request'