5151 exit 1
5252 fi
5353
54- - name : Detect changed paths
55- id : changes
56- uses : dorny/paths-filter@v3
57- # todo: find a way to detect changes within same branch, for now do not push to dev/prod in parallel
58- with :
59- filters : |
60- api:
61- - 'src/api/**'
62- jobs:
63- - 'src/jobs/**'
64-
6554 - name : Backup existing API image
6655 # Pulls the current image using the target tag and backup it with a previous tag if it exists.
67- if : steps.changes.outputs.api == 'true'
6856 run : |
6957 OWNER="${{ github.repository_owner }}"
7058 BASE="${{ github.event.repository.name }}-api"
8068
8169 - name : Backup existing Jobs image
8270 # Pulls the current image using the target tag and backup it with a previous tag if it exists.
83- if : steps.changes.outputs.jobs == 'true'
8471 run : |
8572 OWNER="${{ github.repository_owner }}"
8673 BASE="${{ github.event.repository.name }}-jobs"
9683
9784 - name : Cleanup Old API Image Digests
9885 # Cleans up old api images
99- if : steps.changes.outputs.api == 'true'
10086 uses : actions/delete-package-versions@v5
10187 continue-on-error : true
10288 with :
10894
10995 - name : Cleanup Old Jobs Image Digests
11096 # Cleans up old jobs images
111- if : steps.changes.outputs.jobs == 'true'
11297 uses : actions/delete-package-versions@v5
11398 continue-on-error : true
11499 with :
@@ -120,7 +105,6 @@ jobs:
120105
121106 - name : Build & push API image
122107 # Builds a new Docker image with the target tag and pushes it to GHCR.
123- if : steps.changes.outputs.api == 'true'
124108 run : |
125109 OWNER=${{ github.repository_owner }}
126110 BASE=${{ github.event.repository.name }}-api
@@ -138,7 +122,6 @@ jobs:
138122
139123 - name : Build & push Jobs image
140124 # Builds a new Docker image with the target tag and pushes it to GHCR.
141- if : steps.changes.outputs.jobs == 'true'
142125 run : |
143126 OWNER=${{ github.repository_owner }}
144127 BASE=${{ github.event.repository.name }}-jobs
0 commit comments