update-flake.yml

 1name: Update flake.lock
 2
 3on:
 4  push:
 5    branches: [master]
 6    paths: [go.sum]
 7  workflow_dispatch:
 8
 9jobs:
10  update:
11    runs-on: ubuntu-latest
12    steps:
13      - uses: actions/checkout@v6
14
15      - uses: DeterminateSystems/nix-installer-action@main
16
17      - name: Update flake.lock
18        run: nix flake update
19
20      - name: Commit and push changes
21        env:
22          GH_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
23        run: |
24          git diff --quiet flake.lock && exit 0
25          git config user.name "github-actions[bot]"
26          git config user.email "github-actions[bot]@users.noreply.github.com"
27          git add .
28          git commit -m "chore: update flake.lock (#228)"
29          git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git
30          git push origin HEAD:${GITHUB_REF}