Skip to content

Commit fcc6adb

Browse files
authored
Merge pull request #58 from UCEAP/50-manual-docker-build
Allow triggering the Docker build manually
2 parents 6d089e1 + 25ff8ec commit fcc6adb

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎.github/workflows/docker-publish.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ on:
1414
tags: [ 'v*.*.*' ]
1515
pull_request:
1616
branches: [ "main" ]
17+
# Rebuild on demand, e.g. to pick up a security update without waiting for the
18+
# weekly schedule. Select the branch to build in the "Run workflow" dialog; the
19+
# image is tagged after that branch, same as a push to it.
20+
workflow_dispatch:
21+
inputs:
22+
no_cache:
23+
description: 'Build without cache (pulls fresh base image and re-runs package installs)'
24+
type: boolean
25+
default: false
1726

1827
env:
1928
# Use docker.io for Docker Hub if empty
@@ -84,6 +93,10 @@ jobs:
8493
labels: ${{ steps.meta.outputs.labels }}
8594
cache-from: type=gha
8695
cache-to: type=gha,mode=max
96+
# A cached build would happily reuse the vulnerable layers a security
97+
# rebuild is meant to replace, so let the operator opt out of the cache.
98+
no-cache: ${{ inputs.no_cache == true }}
99+
pull: ${{ inputs.no_cache == true }}
87100

88101
# Sign the resulting Docker image digest.
89102
# This will only write to the public Rekor transparency log when the Docker

0 commit comments

Comments
 (0)