Skip to content

Commit 951a5ee

Browse files
authored
Skip prerelease versions in sync-zizmor-versions workflow (#158)
1 parent 79f0191 commit 951a5ee

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

support/sync-zizmor-versions.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ tags=$(skopeo list-tags "docker://${IMAGE}" | jq -r '.Tags[]')
3030
# and emit it as a line in the format:
3131
# <tag> <digest>
3232
for tag in ${tags}; do
33+
# Skip prerelease versions (e.g. 1.30.0rc1, 1.30.0-beta.1)
34+
# Only allow "latest" or strict MAJOR.MINOR.PATCH.
35+
if [[ "${tag}" != "latest" ]] && ! [[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
36+
continue
37+
fi
3338
# Retry up to 5 times, since GHCR is unreliable.
3439
digest=$(skopeo --override-os=linux --override-arch=amd64 inspect --retry-times=5 "docker://${IMAGE}:${tag}" | jq -r '.Digest')
3540
echo "${tag} ${digest}"

0 commit comments

Comments
 (0)