Skip to content

Commit 53f8f41

Browse files
committed
fix: prefix alt branches with author
1 parent f9767d0 commit 53f8f41

33 files changed

+92
-0
lines changed

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ inputs:
44
input:
55
description: 'The branch, tag, SHA or custom name to build a tag for'
66
required: true
7+
repository:
8+
description: 'The source repository (e.g., ethereum/go-ethereum)'
9+
required: false
10+
upstream_repository:
11+
description: 'The upstream repository to compare against (e.g., ethereum/go-ethereum)'
12+
required: false
713
outputs:
814
docker_tag:
915
description: "The docker tag to use"
@@ -21,6 +27,26 @@ runs:
2127
exit 1
2228
fi
2329
30+
# Check if repository is provided and is not the upstream repo
31+
repository="${{ inputs.repository }}"
32+
upstream_repo="${{ inputs.upstream_repository }}"
33+
prefix=""
34+
35+
# If upstream_repo is not provided, we don't add any prefix
36+
# This maintains backward compatibility
37+
if [ -n "$upstream_repo" ] && [ -n "$repository" ]; then
38+
# If repository is provided and is not the upstream, extract author and prefix
39+
if [ "$repository" != "$upstream_repo" ]; then
40+
# Extract the author part (everything before the /)
41+
author="$(echo "$repository" | cut -d'/' -f1)"
42+
if [ -n "$author" ]; then
43+
prefix="${author}-"
44+
echo "Non-upstream repository detected: $repository (upstream: $upstream_repo)"
45+
echo "Adding prefix: $prefix"
46+
fi
47+
fi
48+
fi
49+
2450
# replace all special characters to - (allowed: -_.)
2551
# fix/bug#123 -> fix-bug-123
2652
# pr@123 -> pr-123
@@ -31,6 +57,8 @@ runs:
3157
# -fix -> fix
3258
docker_tag="$(echo "$docker_tag" | sed 's/^-*//')"
3359
60+
# Add prefix if we have one
61+
docker_tag="${prefix}${docker_tag}"
3462
3563
echo "docker_tag=$docker_tag" >> $GITHUB_OUTPUT
3664
echo "Docker Tag: $docker_tag"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: ethpandaops/armiarma
3941
deploy:
4042
needs:
4143
- prepare

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: dapplion/beacon-metrics-gazer
3941
deploy:
4042
needs:
4143
- prepare

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: hyperledger/besu
3941
deploy:
4042
needs:
4143
- prepare

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: ralexstokes/ethereum_consensus_monitor
3941
deploy:
4042
needs:
4143
- prepare

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: sigp/eleel
3941
deploy:
4042
needs:
4143
- prepare

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: erigontech/erigon
3941
deploy:
4042
needs:
4143
- prepare

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: probe-lab/eth-das-guardian
3941
deploy:
4042
needs:
4143
- prepare

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: ethpandaops/ethereum-genesis-generator
3941
deploy:
4042
needs:
4143
- prepare

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/actions/docker-tag
3737
with:
3838
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: ethereumjs/ethereumjs-monorepo
3941
deploy:
4042
needs:
4143
- prepare

0 commit comments

Comments
 (0)