Merge pull request #137 from datum-cloud/feat/machine-account-login #111
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |