Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 6 additions & 38 deletions .github/workflows/nix-update-hash.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,16 @@
name: "nix-update-hash"

on:
push:
paths:
- 'go.mod'
- 'go.sum'
workflow_dispatch:

permissions:
contents: write

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
uses: datum-cloud/actions/.github/workflows/nix-update-hash.yaml@main
secrets: inherit
Loading