Skip to content

Commit be2378f

Browse files
committed
no bloat
1 parent 5c35dfc commit be2378f

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

.github/workflows/nix-github-actions.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,43 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix: ${{ fromJSON(needs.nix-matrix.outputs.matrix) }}
30+
permissions:
31+
contents: write
32+
id-token: write
3033
steps:
3134
- uses: actions/checkout@v4
3235
- uses: wimpysworld/nothing-but-nix@main
36+
with:
37+
hatchet-protocol: 'rampage'
38+
root-safe-haven: '10240' # 2GB is plenty for the OS
39+
mnt-safe-haven: '1024' # 1GB is enough for small temp files
3340
- uses: DeterminateSystems/determinate-nix-action@main
34-
41+
- uses: DeterminateSystems/magic-nix-cache-action@main
3542
- name: Build and Stage
3643
run: |
3744
nix build -L '.#${{ matrix.attr }}' \
3845
--option system-features "nixos-test benchmark big-parallel kvm" \
3946
--option auto-optimise-store true
4047
41-
mkdir -p staging
42-
# Recursively find any build product and follow symlinks
48+
sync
49+
50+
mkdir -p output
4351
find -L result -type f | while read -r file; do
4452
filename=$(basename "$file")
45-
cp -L "$file" "staging/${{ github.ref_name }}-${{ matrix.system }}-$filename"
53+
cp -L "$file" "output/${{ github.ref_name }}-${{ matrix.system }}-$filename"
4654
done
4755
48-
rm result
49-
nix-store --gc
50-
51-
- name: Upload Temporary Artifact
56+
- name: Upload Artifact
5257
uses: actions/upload-artifact@v4
5358
with:
5459
name: artifact-${{ matrix.system }}-${{ matrix.name }}
55-
path: staging/
60+
path: output/
61+
follow-symbolic-links: true
5662
retention-days: 1
5763

5864
release:
5965
needs: nix-build
66+
if: ${{ always() && !cancelled() }} # Always run if an artifact can be used
6067
runs-on: ubuntu-latest
6168
permissions:
6269
contents: write

0 commit comments

Comments
 (0)