Skip to content

Commit

Permalink
Update the Nix hash on PR, not on the main branch (#817)
Browse files Browse the repository at this point in the history
* Run the Nix workflow on PR

* Use git-auto-commit-action for pushing the hash change from CI

* Add workflow_dispatch trigger

* Run nix build
  • Loading branch information
akirak authored Sep 3, 2024
1 parent d6e1a73 commit 371ea86
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Nix derivation checks

on:
push:
branches: ["main"]
pull_request:
paths: ["mix.lock"]
workflow_dispatch:

jobs:
auto-update-nix-hash:
Expand All @@ -15,8 +15,8 @@ jobs:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: |
nix run .#update-hash | tee nix/hash
git config user.email ""
git config user.name "GitHub Action Bot"
git commit -m 'Update Nix hash of Mix deps' nix/hash && git push || true
- run: nix run .#update-hash | tee nix/hash
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'Update Nix hash of Mix deps'
- run: nix build

0 comments on commit 371ea86

Please sign in to comment.