Skip to content

Commit 6042ca2

Browse files
authored
chore: update Nix workflow to not return error (#683)
The script is expected to fail, so we need to handle that value. This commit changes Nix script to not fail anymore (it will always succeed) and it will update `nix/hash` to new value as needed. Additionally this updates value immediately.
1 parent ccf355f commit 6042ca2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/nix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: DeterminateSystems/nix-installer-action@main
1717
- uses: DeterminateSystems/magic-nix-cache-action@main
1818
- run: |
19-
nix run .#update-hash
19+
nix run .#update-hash | tee nix/hash
2020
git config user.email ""
2121
git config user.name "GitHub Action Bot"
2222
git commit -m 'Update Nix hash of Mix deps' nix/hash && git push || true

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
text = ''
4040
nix --extra-experimental-features 'nix-command flakes' \
41-
build --no-link "${self}#__fodHashGen" 2>&1 | gawk '/got:/ { print $2 }'
41+
build --no-link "${self}#__fodHashGen" 2>&1 | gawk '/got:/ { print $2 }' || true
4242
'';
4343
};
4444
in {

nix/hash

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sha256-G0mT+rvXZWLJIMfrhxq3TXt26wDImayu44wGEYJ+3CE=
1+
sha256-TnWGHD1Is7rX/zS1+3+9B+dWsGXX2sm/abF1cnFkEeA=

0 commit comments

Comments
 (0)