Align CI bundle names with script defaults

This commit is contained in:
andrussal 2025-12-09 16:44:36 +01:00
parent c093cad17c
commit 13fbcc0402
2 changed files with 18 additions and 10 deletions

View File

@ -56,13 +56,15 @@ jobs:
- name: Build nomos binaries bundle
run: |
chmod +x scripts/build-bundle.sh
scripts/build-bundle.sh --platform linux --output nomos-binaries.tar.gz
DEST=".tmp/nomos-binaries-linux-${VERSION}.tar.gz"
scripts/build-bundle.sh --platform linux --output "$DEST"
echo "NOMOS_BINARIES_TAR=$DEST" >> "$GITHUB_ENV"
- name: Save nomos binaries cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/nomos-binaries.tar.gz
key: ${{ runner.os }}-nomos-binaries-${{ env.NOMOS_NODE_REV }}-${{ env.NOMOS_BUNDLE_VERSION }}
path: ${{ github.workspace }}/.tmp/nomos-binaries-linux-${{ env.VERSION }}.tar.gz
key: ${{ runner.os }}-nomos-binaries-${{ env.VERSION }}-${{ env.NOMOS_BUNDLE_VERSION }}
- uses: actions/upload-artifact@v4
with:
name: nomos-binaries-${{ runner.os }}-${{ env.NOMOS_NODE_REV }}-${{ env.NOMOS_BUNDLE_VERSION }}
path: nomos-binaries.tar.gz
name: nomos-binaries-linux-${{ env.VERSION }}-${{ env.NOMOS_BUNDLE_VERSION }}
path: .tmp/nomos-binaries-linux-${{ env.VERSION }}.tar.gz

View File

@ -213,14 +213,14 @@ jobs:
id: restore-nomos-bins-host
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.tmp/nomos-binaries.tar.gz
key: ${{ runner.os }}-nomos-binaries-${{ env.NOMOS_NODE_REV }}-${{ env.NOMOS_BUNDLE_VERSION }}
path: ${{ github.workspace }}/.tmp/nomos-binaries-host-${{ env.VERSION }}.tar.gz
key: ${{ runner.os }}-nomos-binaries-host-${{ env.VERSION }}-${{ env.NOMOS_BUNDLE_VERSION }}
- name: Download nomos binaries artifact (fallback)
if: steps.restore-nomos-bins-host.outputs.cache-hit != 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARTIFACT_NAME: nomos-binaries-${{ runner.os }}-${{ env.NOMOS_NODE_REV }}-${{ env.NOMOS_BUNDLE_VERSION }}
ARTIFACT_NAME: nomos-binaries-host-${{ env.VERSION }}-${{ env.NOMOS_BUNDLE_VERSION }}
run: |
set -euo pipefail
mkdir -p "${TMPDIR}"
@ -232,12 +232,18 @@ jobs:
fi
gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/artifacts/${artifact_id}/zip" > "${TMPDIR}/nomos-binaries.zip"
unzip -o "${TMPDIR}/nomos-binaries.zip" -d "${TMPDIR}"
mv "${TMPDIR}/nomos-binaries.tar.gz" "${GITHUB_WORKSPACE}/.tmp/nomos-binaries.tar.gz"
found_tar="$(find "${TMPDIR}" -name 'nomos-binaries-*.tar.gz' -maxdepth 2 | head -n1)"
if [ -z "$found_tar" ]; then
echo "Expected a nomos-binaries tar.gz in downloaded artifact" >&2
exit 1
fi
mkdir -p "${GITHUB_WORKSPACE}/.tmp"
mv "$found_tar" "${GITHUB_WORKSPACE}/.tmp/nomos-binaries-host-${VERSION}.tar.gz"
- name: Normalize host bundle path
run: |
set -euo pipefail
mkdir -p .tmp
SRC="${GITHUB_WORKSPACE}/.tmp/nomos-binaries.tar.gz"
SRC="${GITHUB_WORKSPACE}/.tmp/nomos-binaries-host-${VERSION}.tar.gz"
DEST="${GITHUB_WORKSPACE}/.tmp/nomos-binaries-host-${VERSION}.tar.gz"
if [ -f "${SRC}" ]; then
mv "${SRC}" "${DEST}"