@@ -3,7 +3,12 @@ name: Update Docker Images
33on :
44 schedule :
55 - cron : " 0 2 * * *" # run every day at 02:00 UTC
6- workflow_dispatch : # yamllint disable-line rule:empty-values
6+ workflow_dispatch :
7+ inputs :
8+ force-update :
9+ description : ' Force update of images'
10+ required : false
11+ type : boolean
712
813defaults :
914 run :
@@ -43,15 +48,15 @@ jobs:
4348 - name : Set NGINX version
4449 id : nginx
4550 run : |
46- version=library/nginx: $(grep -m1 "FROM.*nginx:.*alpine" < build/Dockerfile.nginx | awk -F"[ :] " '{print $3 }')
51+ version=$(grep -m1 "FROM.*nginx:.*alpine" < build/Dockerfile.nginx | awk -F" " '{print $2 }')
4752 echo nginx_version=${version} >> $GITHUB_OUTPUT
4853
4954 check :
5055 name : Check if updates are needed
5156 runs-on : ubuntu-24.04
5257 needs : variables
5358 outputs :
54- needs-updating : ${{ steps.needs .outputs.needs-updating }}
59+ needs-updating : ${{ steps.update .outputs.needs-updating }}
5560 steps :
5661 - name : Login to GitHub Container Registry
5762 uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
@@ -66,15 +71,11 @@ jobs:
6671 with :
6772 base-image : ${{ needs.variables.outputs.nginx_version }}
6873 image : ghcr.io/nginxinc/nginx-gateway-fabric/nginx:${{ needs.variables.outputs.ngf_tag }}
69- platforms : " linux/arm64,linux/amd64"
70-
71- - id : needs
72- run : echo "needs-updating=${{ steps.update.outputs.needs-updating }}" >> $GITHUB_OUTPUT
7374
7475 build :
7576 name : Build Image
7677 needs : [variables, check]
77- if : ${{ needs.check.outputs.needs-updating }}
78+ if : ${{ needs.check.outputs.needs-updating == 'true' || inputs.force-update == true }}
7879 uses : ./.github/workflows/build.yml
7980 with :
8081 image : nginx
0 commit comments