mirror of
https://github.com/germondai/trawl.git
synced 2026-08-17 12:11:23 +02:00
fix(ci): inspect pushed tag instead of re-deriving from github.sha
This commit is contained in:
@@ -115,13 +115,14 @@ jobs:
|
||||
- name: Inspect manifest
|
||||
env:
|
||||
IMAGE: ${{ env.IMAGE }}
|
||||
REF: ${{ github.ref }}
|
||||
SHA: ${{ github.sha }}
|
||||
run: |
|
||||
if [[ "$REF" == refs/tags/v* ]]; then
|
||||
tag="${REF#refs/tags/}"
|
||||
else
|
||||
tag="nightly-$SHA"
|
||||
fi
|
||||
# Pull the first tag actually pushed by docker/metadata-action in the previous
|
||||
# step (env var DOCKER_METADATA_OUTPUT_JSON). The legacy logic re-derived from
|
||||
# ${{ github.ref }} / ${{ github.sha }}, but `type=sha,prefix=nightly-` writes
|
||||
# the short 7-char SHA while `${{ github.sha }}` is the full 40-char hash, so
|
||||
# the inspect always 404'd on main pushes (e.g. searched for
|
||||
# nightly-2b146e36bd89510b0027978d72fdcb2a95b5bb37 but only
|
||||
# nightly-2b146e3 was pushed).
|
||||
tag=$(jq -r '.tags[0]' <<< "$DOCKER_METADATA_OUTPUT_JSON")
|
||||
docker buildx imagetools inspect "$IMAGE:$tag"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user