Update flake.lock #34
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: Update flake.lock | |
| on: | |
| schedule: | |
| - cron: '0 3 * * 0' # every Sunday at 3:00 AM UTC | |
| workflow_dispatch: | |
| jobs: | |
| update-flake-lock: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Nix | |
| uses: cachix/install-nix-action@v27 | |
| - name: Update flake | |
| run: nix flake update | |
| - name: Commit and push if flake.lock changed | |
| run: | | |
| if git diff --quiet flake.lock; then | |
| echo "No changes to flake.lock" | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -am "Automated flake.lock update" | |
| git push "https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git" |