File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI w/ attic caching
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ workflow_dispatch :
8+
9+ jobs :
10+ check :
11+ strategy :
12+ matrix :
13+ include :
14+ - name : x86_64-linux
15+ runner : [ self-hosted, legacy ]
16+ - name : aarch64-darwin
17+ runner : [ self-hosted, macos ]
18+ name : Build (${{ matrix.name }})
19+ runs-on : ${{ matrix.runner }}
20+
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - name : Set up Attic cache
25+ env :
26+ ATTIC_ENDPOINT : ${{ secrets.ATTIC_ENDPOINT }}
27+ ATTIC_CACHE : ${{ secrets.ATTIC_CACHE }}
28+ ATTIC_TOKEN : ${{ secrets.ATTIC_TOKEN }}
29+ run : |
30+ attic login --set-default admin "$ATTIC_ENDPOINT" "$ATTIC_TOKEN"
31+ attic use "$ATTIC_CACHE"
32+
33+ - name : Build and cache flake outputs
34+ env :
35+ ATTIC_ENDPOINT : ${{ secrets.ATTIC_ENDPOINT }}
36+ ATTIC_CACHE : ${{ secrets.ATTIC_CACHE }}
37+ run : |
38+ nix build .#ci --print-build-logs --max-jobs auto --json | jq -r '.[].outputs.out' | nix path-info -r --stdin | attic push --stdin "$ATTIC_CACHE"
You can’t perform that action at this time.
0 commit comments