Update Flake #259
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 | |
| on: | |
| schedule: | |
| # Run daily at 3:00 UTC | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-flake: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Configure Git | |
| run: | | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| - name: Update flake inputs | |
| run: | | |
| nix flake update --commit-lock-file | |
| - name: Check if updates were made | |
| id: check-updates | |
| run: | | |
| if git diff --quiet HEAD~1 HEAD -- flake.lock; then | |
| echo "updated=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "updated=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.check-updates.outputs.updated == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: update flake.lock" | |
| title: "chore: update flake.lock" | |
| body: | | |
| Automated update of flake.lock dependencies. | |
| This PR was automatically created by the update-flake workflow. | |
| branch: update-flake-lock | |
| delete-branch: true |