Commit bbbb69e
authored
Re-derive git_commit_hash in manifest action to stop trailing-dash tags (#370)
## Summary
Fixes the `<tag>-` (literal trailing dash, no commit hash) pollution on
Docker Hub — e.g. `ethpandaops/teku:glamsterdam-devnet-0-` pushed at
2026-04-29T13:53:54Z.
The shared manifest action concatenates
`${target_tag}-${inputs.git_commit_hash}` with no validation. When the
upstream `deploy` job's matrix output isn't readable — most commonly
when someone uses **"Re-run failed jobs"** on the manifest job alone,
since GitHub Actions [drops `needs.<job>.outputs.*` on
re-runs](https://github.com/orgs/community/discussions/27905) — the
input is empty and the action silently pushes a literal `<tag>-`
manifest. The base `<tag>` is repointed to the same digest (so its
`last_updated` doesn't move), which is exactly the fingerprint we saw on
Docker Hub.
This is a structural bug in the shared action, so the fix lands once in
`.github/actions/manifest/action.yml` and covers every client (`teku`,
`besu`, `geth`, `lighthouse`, `lodestar`, `nethermind`, `nimbus-eth2`,
`prysm`, `reth`, `grandine`, `ethrex`, …).
## Changes
- New `Resolve git commit hash` step in `manifest/action.yml`:
- If `inputs.git_commit_hash` is non-empty → use it (current behaviour).
- If empty → re-derive via `git ls-remote
https://github.com/<source_repository>.git <source_ref>` and fall back
to treating the ref as a SHA if `ls-remote` returns nothing.
- If still empty → **fail the step** instead of pushing a trailing-dash
tag.
- All 5 references to `${{ inputs.git_commit_hash }}` in the action body
now read `${{ steps.resolve_hash.outputs.git_commit_hash }}`.
- `git_commit_hash` input flipped from `required: true` → `required:
false` since callers no longer need to supply it for correct behaviour;
description updated.
## Test plan
- [ ] Trigger a normal `build-push-teku.yml` run and confirm both
`<tag>` and `<tag>-<commit>` manifests are pushed (no behaviour change
on the happy path).
- [ ] Verify on a workflow that exercises Harbor (`HARBOR_REGISTRY` set)
that the harbor manifest also gets the resolved commit hash.
- [ ] Force the empty-input path by triggering "Re-run failed jobs" on a
manifest job whose deploy succeeded in the prior run; confirm the action
re-derives the hash and pushes `<tag>-<commit>` (not `<tag>-`).
- [ ] Force a failure: pass an invalid `source_ref` with an empty
`git_commit_hash`; confirm the step exits with `::error::Could not
resolve git_commit_hash...` instead of pushing a trailing-dash tag.
- [ ] Manually delete the existing
`ethpandaops/teku:glamsterdam-devnet-0-` tag on Docker Hub once this
lands.1 parent f68bd44 commit bbbb69e
1 file changed
Lines changed: 31 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
48 | 72 | | |
49 | 73 | | |
50 | 74 | | |
| |||
67 | 91 | | |
68 | 92 | | |
69 | 93 | | |
70 | | - | |
| 94 | + | |
71 | 95 | | |
72 | 96 | | |
73 | 97 | | |
74 | | - | |
| 98 | + | |
75 | 99 | | |
76 | 100 | | |
77 | 101 | | |
| |||
111 | 135 | | |
112 | 136 | | |
113 | 137 | | |
114 | | - | |
115 | | - | |
| 138 | + | |
| 139 | + | |
116 | 140 | | |
117 | 141 | | |
118 | 142 | | |
| |||
121 | 145 | | |
122 | 146 | | |
123 | 147 | | |
124 | | - | |
| 148 | + | |
125 | 149 | | |
0 commit comments