From 698e45cc7be1fb58d7e6aed82155fddb3871bf2d Mon Sep 17 00:00:00 2001 From: Johnny Bouder Date: Thu, 22 Oct 2026 09:25:00 -0400 Subject: [PATCH] ci(release): skip the GHCR mirror when the chart version is already there A Chart.yaml change without a version bump (#171 removing the release-please markers) re-ran Release: pack-release skipped the existing nebari-apps-0.1.0, but mirror-oci pushed the same tarball again and moved the 0.1.0 tag in GHCR to a new digest. pack-release has no output saying it skipped, so the mirror job asks GHCR itself. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Ap1Tqx1QLHRGVVSXdxeduM --- .github/workflows/release.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7573510..d8cb68b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -69,4 +69,11 @@ jobs: REPO: ${{ github.repository }} run: | echo "$GH_TOKEN" | helm registry login ghcr.io --username "$ACTOR" --password-stdin + version=$(grep -E '^version:' charts/nebari-apps/Chart.yaml | awk '{print $2}' | tr -d "\"'") + # A Chart.yaml change without a version bump re-runs this workflow; + # pushing again would move the tag to a new digest. + if helm show chart "oci://ghcr.io/${REPO}/charts/nebari-apps" --version "$version" >/dev/null 2>&1; then + echo "::notice::nebari-apps ${version} is already in GHCR, skipping." + exit 0 + fi helm push dist/*.tgz "oci://ghcr.io/${REPO}/charts"