Fix download artifact declaration
This commit is contained in:
parent
e02976750d
commit
3708b7cec6
9
.github/workflows/build.yaml
vendored
9
.github/workflows/build.yaml
vendored
|
@ -8,7 +8,8 @@ jobs:
|
|||
build-artifacts:
|
||||
runs-on: ${{ matrix.systems.runner }}
|
||||
env:
|
||||
CLOSURE_FILE: magic-nix-cache.closure.xz
|
||||
CLOSURE_NAME: magic-nix-cache-${{ matrix.systems.system }}
|
||||
CLOSURE_PATH: magic-nix-cache.closure.xz
|
||||
strategy:
|
||||
matrix:
|
||||
systems:
|
||||
|
@ -39,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_FILE }}"
|
||||
nix-store --export $(nix-store -qR ./result) | xz -9 > "${{ env.CLOSURE_PATH }}"
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
# Artifact name
|
||||
name: magic-nix-cache-${{ matrix.systems.system }}
|
||||
path: ${{ env.CLOSURE_FILE }}
|
||||
name: ${{ env.CLOSURE_NAME }}
|
||||
path: ${{ env.CLOSURE_PATH }}
|
||||
retention-days: 1
|
||||
|
|
9
.github/workflows/check-and-test.yaml
vendored
9
.github/workflows/check-and-test.yaml
vendored
|
@ -41,7 +41,8 @@ jobs:
|
|||
runs-on: ${{ matrix.systems.runner }}
|
||||
needs: build
|
||||
env:
|
||||
CLOSURE_FILE: magic-nix-cache-${{ matrix.systems.system }}
|
||||
CLOSURE_NAME: magic-nix-cache-${{ matrix.systems.system }}
|
||||
CLOSURE_PATH: magic-nix-cache.closure.xz
|
||||
strategy:
|
||||
matrix:
|
||||
systems:
|
||||
|
@ -60,8 +61,8 @@ jobs:
|
|||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ env.CLOSURE_FILE }}
|
||||
path: ${{ env.CLOSURE_FILE }}
|
||||
name: ${{ env.CLOSURE_NAME }}
|
||||
path: ${{ env.CLOSURE_PATH }}
|
||||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
|
@ -69,7 +70,7 @@ jobs:
|
|||
- name: Extract
|
||||
id: extract
|
||||
run: |
|
||||
OUTPUT=$(cat ${{ env.CLOSURE_FILE }} | xz -d | nix-store --import)
|
||||
OUTPUT=$(cat ${{ env.CLOSURE_PATH }} | xz -d | nix-store --import)
|
||||
MNC_BIN_PATH=$(echo "${OUTPUT}" | tail -n 1)
|
||||
MAGIC_NIX_CACHE="${MNC_BIN_PATH}/bin/magic-nix-cache"
|
||||
|
||||
|
|
Loading…
Reference in a new issue