File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 88jobs :
99 build :
1010 runs-on : ubuntu-latest
11+ permissions :
12+ id-token : read
13+ contents : write
1114 steps :
1215 - uses : actions/checkout@v6
1316
17+ - uses : DeterminateSystems/determinate-nix-action@v3
18+
19+ - uses : DeterminateSystems/flakehub-cache-action@main
20+
1421 - name : Install Nix
1522 uses : cachix/install-nix-action@v31
1623
24+ - name : Fix hash mismatches
25+ if : failure() && github.event_name == 'pull_request'
26+ id : fix-hashes
27+ run : |
28+ git stash --include-untracked
29+ git fetch --depth=1 origin "$GITHUB_HEAD_REF"
30+ git checkout -B "$GITHUB_HEAD_REF" "${{ github.event.pull_request.head.sha }}"
31+
32+ determinate-nixd fix hashes --auto-apply
33+
34+ if ! git diff --quiet; then
35+ git config user.name "github-actions[bot]"
36+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
37+ git add --update --ignore-removal .
38+ git commit -m "[dependabot skip] Automatically fix Nix hashes"
39+ git push origin "$GITHUB_HEAD_REF"
40+ fi
41+
42+ git checkout -
43+ git stash pop || true
44+
1745 - name : Build package
1846 run : nix build -f default.nix
You can’t perform that action at this time.
0 commit comments