From 32b26dcc2461b2552f1efe343129c788406336db Mon Sep 17 00:00:00 2001 From: Luke R Date: Wed, 13 Nov 2024 11:44:24 -0800 Subject: [PATCH] add step to check if docker file changed --- .gitea/workflows/build-and-push.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index 112a5798..f062915c 100755 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -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'