-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (41 loc) · 1.19 KB
/
nix-update-hash.yaml
File metadata and controls
48 lines (41 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "nix-update-hash"
on:
push:
paths:
- 'go.mod'
- 'go.sum'
workflow_dispatch:
jobs:
update-hash:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Install Task
uses: arduino/setup-task@v2
- name: Update nix vendor hash
run: task nix-update-hash
- name: Check for changes
id: git-check
run: |
git diff --exit-code flake.nix || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit and push changes
if: steps.git-check.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add flake.nix
git commit -m "chore(nix): update vendorHash for go deps"
git push