add step to check if docker file changed
This commit is contained in:
parent
0ace86fe49
commit
2956a7a556
@ -32,6 +32,8 @@ jobs:
|
|||||||
filters: |
|
filters: |
|
||||||
python_files:
|
python_files:
|
||||||
- 'app/**/*.py'
|
- 'app/**/*.py'
|
||||||
|
docker_file:
|
||||||
|
- 'Dockerfile'
|
||||||
- name: install UV
|
- name: install UV
|
||||||
run: |
|
run: |
|
||||||
pip install uv --quiet
|
pip install uv --quiet
|
||||||
@ -43,7 +45,7 @@ jobs:
|
|||||||
if: steps.filter.outputs.python_files == 'true'
|
if: steps.filter.outputs.python_files == 'true'
|
||||||
Build-and-Push-Docker:
|
Build-and-Push-Docker:
|
||||||
needs: [changes, Lint-Python]
|
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:
|
steps:
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
@ -64,7 +66,7 @@ jobs:
|
|||||||
ldooks/dragon-bot:${{ gitea.run_id }}
|
ldooks/dragon-bot:${{ gitea.run_id }}
|
||||||
sync-argocd-app:
|
sync-argocd-app:
|
||||||
needs: [changes, Build-and-Push-Docker]
|
needs: [changes, Build-and-Push-Docker]
|
||||||
if: ${{ needs.changes.outputs.python_files == 'true' }}
|
if: ${{ needs.Build-and-Push-Docker.result == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Sync app in ArgoCD
|
- name: Sync app in ArgoCD
|
||||||
uses: clowdhaus/argo-cd-action/@main
|
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 }}
|
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:
|
post-status-to-discord:
|
||||||
needs: [changes, Build-and-Push-Docker]
|
needs: [changes, Build-and-Push-Docker]
|
||||||
if: ${{ needs.changes.outputs.python_files == 'true' }}
|
if: ${{ needs.Build-and-Push-Docker.result == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Post status to discord
|
- name: Post status to discord
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user