Skip to content

Modern Docker Management, Designed for Everyone

chore: fix disgest copy variable

Kyle Mendell70ba681574ae
diff --git a/.depot/workflows/build-next-images.yml b/.depot/workflows/build-next-images.yml
index 71d1db51a..1caa8c665 100644
--- a/.depot/workflows/build-next-images.yml
+++ b/.depot/workflows/build-next-images.yml
@@ -37,7 +37,7 @@ jobs:
outputs:
manager-digest: ${{ steps.digests.outputs.manager }}
agent-digest: ${{ steps.digests.outputs.agent }}
- version: ${{ needs.next-version.outputs.version }}
+ version: ${{ steps.digests.outputs.version }}
runs-on:
size: 32x128
image: g7r5wqb57k.registry.depot.dev/ci:latest
@@ -144,6 +144,7 @@ jobs:
fi
echo "$image=$digest" >> "$GITHUB_OUTPUT"
done
+ echo "version=$IMAGE_VERSION" >> "$GITHUB_OUTPUT"
publish-images:
name: Publish ${{ matrix.registry }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7dd6e9e61..35aef3762 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -131,7 +131,7 @@ jobs:
outputs:
manager-digest: ${{ steps.digests.outputs.manager }}
agent-digest: ${{ steps.digests.outputs.agent }}
- version: ${{ needs.prepare.outputs.version }}
+ version: ${{ steps.digests.outputs.version }}
if: needs.prepare.outputs.tag != ''
runs-on: depot-ubuntu-24.04-16
permissions:
@@ -272,6 +272,7 @@ jobs:
fi
echo "$image=$digest" >> "$GITHUB_OUTPUT"
done
+ echo "version=$IMAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Container image attestation (manager)
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
diff --git a/scripts/ci/publish-images.sh b/scripts/ci/publish-images.sh
index 210fb7d1f..4cc8adb1b 100644
--- a/scripts/ci/publish-images.sh
+++ b/scripts/ci/publish-images.sh
@@ -17,7 +17,10 @@ done
case "$IMAGE_CHANNEL" in
next)
- [[ "$IMAGE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-next\.[0-9]+$ ]]
+ if [[ ! "$IMAGE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-next\.[0-9]+$ ]]; then
+ echo "Invalid next image version: '$IMAGE_VERSION' (expected X.Y.Z-next.N)" >&2
+ exit 1
+ fi
moving_tag=next
tags=("v$IMAGE_VERSION" next)
if [[ "$IMAGE_REGISTRY" == public.ecr.aws ]]; then
@@ -25,7 +28,10 @@ case "$IMAGE_CHANNEL" in
fi
;;
release)
- [[ "$IMAGE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
+ if [[ ! "$IMAGE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ echo "Invalid release image version: '$IMAGE_VERSION' (expected X.Y.Z)" >&2
+ exit 1
+ fi
IFS=. read -r major minor _ <<<"$IMAGE_VERSION"
moving_tag=latest
tags=("v$IMAGE_VERSION" "v$major.$minor" "v$major" latest)