Fix naming issue

This commit is contained in:
Luc Perkins 2024-05-18 17:07:04 -03:00
parent 3708b7cec6
commit 03d4aa5f66
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
2 changed files with 7 additions and 5 deletions

View file

@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.systems.runner }}
env:
CLOSURE_NAME: magic-nix-cache-${{ matrix.systems.system }}
CLOSURE_PATH: magic-nix-cache.closure.xz
ARCHIVE: magic-nix-cache.closure.xz
strategy:
matrix:
systems:
@ -40,12 +40,12 @@ jobs:
- name: Build package and create closure
run: |
nix build .# -L --fallback && \
nix-store --export $(nix-store -qR ./result) | xz -9 > "${{ env.CLOSURE_PATH }}"
nix-store --export $(nix-store -qR ./result) | xz -9 > "${{ env.ARCHIVE }}"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
# Artifact name
name: ${{ env.CLOSURE_NAME }}
path: ${{ env.CLOSURE_PATH }}
path: ${{ env.ARCHIVE }}
retention-days: 1

View file

@ -42,7 +42,8 @@ jobs:
needs: build
env:
CLOSURE_NAME: magic-nix-cache-${{ matrix.systems.system }}
CLOSURE_PATH: magic-nix-cache.closure.xz
CLOSURE_PATH: magic-nix-cache
ARCHIVE: magic-nix-cache.closure.xz
strategy:
matrix:
systems:
@ -70,7 +71,8 @@ jobs:
- name: Extract
id: extract
run: |
OUTPUT=$(cat ${{ env.CLOSURE_PATH }} | xz -d | nix-store --import)
ARTIFACT="${{ env.CLOSURE_PATH }}/${{ env.ARCHIVE }}"
OUTPUT=$(cat ${ARTIFACT} | xz -d | nix-store --import)
MNC_BIN_PATH=$(echo "${OUTPUT}" | tail -n 1)
MAGIC_NIX_CACHE="${MNC_BIN_PATH}/bin/magic-nix-cache"