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:
@@ -211,6 +211,18 @@ jobs:
|
|||||||
echo "CHECKSUM=$CHECKSUM" >> $GITHUB_ENV
|
echo "CHECKSUM=$CHECKSUM" >> $GITHUB_ENV
|
||||||
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml
|
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
|
- name: Commit and tag
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ inputs.version }}"
|
VERSION="${{ inputs.version }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user