Skip to content

Commit 7c7fd95

Browse files
authored
feat(ci): allow explicit docker_tag from workflow dispatch in docker-… (#322)
…tag action Introduce an `docker_tag` input to the `docker-tag` action. This allows overriding the tag generation logic for workflow dispatches by providing an explicit tag. This change updates the action to accept an optional `docker_tag` input. It is then used to skip prefixing the tag if provided, enabling users to specify the exact tag when manually triggering a workflow. The new input is passed to all relevant build workflows. chore(ci): pass docker_tag input to build/push workflows Propagate the `docker_tag` input to the `build` job step within multiple CI workflows. This ensures that the provided tag is correctly used when building and pushing images, maintaining consistency across different upstream repositories being built.
1 parent 4ff7335 commit 7c7fd95

37 files changed

Lines changed: 44 additions & 3 deletions

.github/actions/docker-tag/action.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ inputs:
1010
upstream_repository:
1111
description: 'The upstream repository to compare against (e.g., ethereum/go-ethereum)'
1212
required: false
13+
docker_tag:
14+
description: 'The docker_tag override from workflow dispatch (if set, skips author prefix)'
15+
required: false
1316
outputs:
1417
docker_tag:
1518
description: "The docker tag to use"
@@ -30,11 +33,13 @@ runs:
3033
# Check if repository is provided and is not the upstream repo
3134
repository="${{ inputs.repository }}"
3235
upstream_repo="${{ inputs.upstream_repository }}"
36+
docker_tag_override="${{ inputs.docker_tag }}"
3337
prefix=""
34-
38+
3539
# If upstream_repo is not provided, we don't add any prefix
3640
# This maintains backward compatibility
37-
if [ -n "$upstream_repo" ] && [ -n "$repository" ]; then
41+
# If docker_tag override is provided, skip prefix (user provided explicit tag)
42+
if [ -n "$upstream_repo" ] && [ -n "$repository" ] && [ -z "$docker_tag_override" ]; then
3843
# If repository is provided and is not the upstream, extract author and prefix
3944
if [ "$repository" != "$upstream_repo" ]; then
4045
# Extract the author part (everything before the /)
@@ -48,7 +53,7 @@ runs:
4853
fi
4954
5055
# replace all special characters to - (allowed: -_.)
51-
# fix/bug#123 -> fix-bug-123
56+
# fix/bug#123 -> fix-bug-123
5257
# pr@123 -> pr-123
5358
# test-1.2 -> test-1.2
5459
docker_tag="$(echo "$docker_tag" | sed 's/[^a-zA-Z0-9._]/-/g')"

.github/workflows/build-push-beacon-metrics-gazer.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: dapplion/beacon-metrics-gazer
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

.github/workflows/build-push-besu.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: hyperledger/besu
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

.github/workflows/build-push-consensus-monitor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: ralexstokes/ethereum_consensus_monitor
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

.github/workflows/build-push-dummy-el.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: ethpandaops/dummy-el
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

.github/workflows/build-push-eleel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: sigp/eleel
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

.github/workflows/build-push-erigon.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: erigontech/erigon
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

.github/workflows/build-push-eth-das-guardian.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: probe-lab/eth-das-guardian
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

.github/workflows/build-push-ethereum-genesis-generator.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: ethpandaops/ethereum-genesis-generator
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

.github/workflows/build-push-ethereumjs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
3939
repository: ${{ inputs.repository }}
4040
upstream_repository: ethereumjs/ethereumjs-monorepo
41+
docker_tag: ${{ inputs.docker_tag }}
4142
deploy:
4243
needs:
4344
- prepare

0 commit comments

Comments
 (0)