Skip to content

Commit 59e4d21

Browse files
authored
Merge pull request #199 from datum-cloud/fix/nix-workflow-pr
fix(nix): use shared nix-update-hash workflow
2 parents 1eae24e + 007d01e commit 59e4d21

1 file changed

Lines changed: 6 additions & 38 deletions

File tree

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,16 @@
11
name: "nix-update-hash"
2+
23
on:
34
push:
45
paths:
56
- 'go.mod'
67
- 'go.sum'
78
workflow_dispatch:
89

10+
permissions:
11+
contents: write
12+
913
jobs:
1014
update-hash:
11-
runs-on: ubuntu-latest
12-
permissions:
13-
contents: write
14-
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v6
17-
with:
18-
token: ${{ secrets.GITHUB_TOKEN }}
19-
20-
- name: Install Nix
21-
uses: cachix/install-nix-action@v31
22-
with:
23-
github_access_token: ${{ secrets.GITHUB_TOKEN }}
24-
25-
- name: Install Go
26-
uses: actions/setup-go@v6
27-
with:
28-
go-version-file: 'go.mod'
29-
30-
- name: Install Task
31-
uses: arduino/setup-task@v2
32-
33-
- name: Update nix vendor hash
34-
run: task nix-update-hash
35-
36-
- name: Check for changes
37-
id: git-check
38-
run: |
39-
git diff --exit-code flake.nix || echo "changed=true" >> $GITHUB_OUTPUT
40-
41-
- name: Commit and push changes
42-
if: steps.git-check.outputs.changed == 'true'
43-
run: |
44-
git config user.name "github-actions[bot]"
45-
git config user.email "github-actions[bot]@users.noreply.github.com"
46-
git add flake.nix
47-
git commit -m "chore(nix): update vendorHash for go deps"
48-
git push
15+
uses: datum-cloud/actions/.github/workflows/nix-update-hash.yaml@main
16+
secrets: inherit

0 commit comments

Comments
 (0)