Scheduled: Nix flake update #3
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: "Scheduled: Nix flake update" | |
| on: | |
| schedule: | |
| # Run every Monday at 09:00 UTC (aligns with Dependabot's 09:00 Europe/London schedule in winter; 10:00 Europe/London in summer) | |
| - cron: "0 9 * * 1" | |
| workflow_dispatch: # Allow manual trigger | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-flake: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Nix | |
| uses: ./.github/actions/setup-nix | |
| - name: Update flake.lock | |
| run: nix flake update | |
| - name: Check if flake.lock changed | |
| id: check-changes | |
| run: | | |
| if git diff --quiet flake.lock; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| id: create-pr | |
| if: steps.check-changes.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore(deps): update nix flake inputs" | |
| title: "chore(deps): update nix flake inputs" | |
| body: | | |
| ## Summary | |
| - Automated update of Nix flake inputs | |
| ## Test plan | |
| - [ ] `nix flake check` passes in CI | |
| - [ ] Development shell works correctly | |
| --- | |
| 🤖 This PR was automatically created by the scheduled Nix flake update workflow. | |
| branch: chore/nix-flake-update | |
| labels: | | |
| dependencies | |
| nix | |
| delete-branch: true | |
| - name: Enable auto-merge | |
| if: steps.create-pr.outputs.pull-request-number | |
| run: gh pr merge --auto --squash "${{ steps.create-pr.outputs.pull-request-url }}" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |