fix(plugin-release): rebuild tarball after checksum update

The tarball was being created BEFORE the checksum was computed and
updated in artifacthub-pkg.yml. This meant the released tarball
contained a placeholder checksum instead of the actual SHA256 hash.

This change adds a step to rebuild the tarball after the checksum
is computed, ensuring the released artifact has the correct checksum.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Hugh Hackman
2026-03-25 12:23:56 +00:00
parent b11bc453dd
commit 5680e942ad
+12
View File
@@ -211,6 +211,18 @@ jobs:
echo "CHECKSUM=$CHECKSUM" >> $GITHUB_ENV
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml
- name: Rebuild tarball with correct checksum
run: |
rm -f "${{ env.TARBALL }}"
npx @kinvolk/headlamp-plugin package
VERSION="${{ inputs.version }}"
PKG_NAME="${{ env.PKG_NAME }}"
TARBALL="${PKG_NAME}-${VERSION}.tar.gz"
for f in *.tar.gz; do
[ "$f" != "$TARBALL" ] && mv "$f" "$TARBALL"
done
echo "TARBALL=$TARBALL" >> $GITHUB_ENV
- name: Commit and tag
run: |
VERSION="${{ inputs.version }}"