File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update Nix Package Hash On Dependabot PRs
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize]
6+ branches :
7+ - main
8+
9+ jobs :
10+ nix-update :
11+ if : github.actor == 'dependabot[bot]'
12+ runs-on : ubuntu-latest
13+
14+ permissions :
15+ contents : write
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v4
20+ with :
21+ ref : ${{ github.head_ref }}
22+ token : ${{ secrets.GITHUB_TOKEN }}
23+
24+ - name : Install Nix
25+ uses : DeterminateSystems/nix-installer-action@main
26+
27+ - name : Run nix-update
28+ run : |
29+ nix run nixpkgs#nix-update -- --flake pangolin-newt --no-src --version skip
30+
31+ - name : Check for changes
32+ id : changes
33+ run : |
34+ if git diff --quiet; then
35+ echo "changed=false" >> "$GITHUB_OUTPUT"
36+ else
37+ echo "changed=true" >> "$GITHUB_OUTPUT"
38+ fi
39+
40+ - name : Commit and push changes
41+ if : steps.changes.outputs.changed == 'true'
42+ run : |
43+ git config user.name "dependabot[bot]"
44+ git config user.email "dependabot[bot]@users.noreply.github.com"
45+
46+ git add .
47+ git commit -m "chore(nix): fix hash for updated go dependencies"
48+ git push
You can’t perform that action at this time.
0 commit comments