Skip to content

Commit 6280ed0

Browse files
authored
Add option to force build all images (#134)
1 parent 7ab130a commit 6280ed0

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/build-docker.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ name: Build Docker Images
22

33
on:
44
schedule:
5-
- cron: '0 1 * * *'
5+
- cron: "0 1 * * *"
66
workflow_dispatch:
7+
inputs:
8+
force:
9+
description: "Force update of all images"
10+
required: false
11+
default: "false"
712

813
defaults:
914
run:
@@ -41,21 +46,21 @@ jobs:
4146
image: ${{ steps.variables.outputs.image }}
4247
- name: Checkout
4348
uses: actions/checkout@v4
44-
if: ${{ steps.update.outputs.needs-updating == 'true' }}
49+
if: ${{ steps.update.outputs.needs-updating == 'true' || inputs.force == 'true '}}
4550
- name: Setup QEMU
4651
uses: docker/setup-qemu-action@v3
4752
with:
4853
platforms: arm/v6,arm,arm64,amd64,ppc64le,s390x,386
49-
if: ${{ steps.update.outputs.needs-updating == 'true' }}
54+
if: ${{ steps.update.outputs.needs-updating == 'true' || inputs.force == 'true' }}
5055
- name: Docker Buildx
5156
uses: docker/setup-buildx-action@v3
52-
if: ${{ steps.update.outputs.needs-updating == 'true' }}
57+
if: ${{ steps.update.outputs.needs-updating == 'true' || inputs.force == 'true' }}
5358
- name: DockerHub Login
5459
uses: docker/login-action@v3
5560
with:
5661
username: ${{ secrets.DOCKER_USERNAME }}
5762
password: ${{ secrets.DOCKER_PASSWORD }}
58-
if: ${{ steps.update.outputs.needs-updating == 'true' }}
63+
if: ${{ steps.update.outputs.needs-updating == 'true' || inputs.force == 'true' }}
5964
- name: Push to Dockerhub for nginx-hello
6065
uses: docker/build-push-action@v5
6166
with:
@@ -66,4 +71,4 @@ jobs:
6671
push: true
6772
provenance: true
6873
sbom: true
69-
if: ${{ steps.update.outputs.needs-updating == 'true' }}
74+
if: ${{ steps.update.outputs.needs-updating == 'true' || inputs.force == 'true' }}

0 commit comments

Comments
 (0)