summaryrefslogtreecommitdiff
path: root/.github/workflows/update-lock.yaml
blob: ec24cd1aa2ebec4ba391f639c62ac6167dbc26dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Update flake.lock

on:
  schedule:
    # run every saturday at 0:00 utc
    - cron: "0 0 * * 6"
  workflow_dispatch:

jobs:
  update:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install Nix
        uses: DeterminateSystems/nix-installer-action@v12

      - name: Update lockfile & make PR
        uses: DeterminateSystems/update-flake-lock@v22
        id: update
        with:
          token: ${{ secrets.MERGE_TOKEN }}

      - name: Enable auto-merge
        shell: bash
        run: gh pr merge --auto --rebase "$PR_ID"
        env:
          GITHUB_TOKEN: ${{ secrets.MERGE_TOKEN }}
          PR_ID: ${{ steps.update.outputs.pull-request-number }}