summaryrefslogtreecommitdiff
path: root/.github/workflows/update-lock.yaml
blob: e735b8190542f1e5a70788826d3fc3a7442b057c (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
31
32
33
34
35
36
name: update flake lock

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

jobs:
  update:
    runs-on: ubuntu-latest

    permissions:
      contents: write
      pull-requests: write

    steps:
      - uses: actions/checkout@v4

      - name: install nix
        uses: nixbuild/nix-quick-install-action@v26

      - name: update lockfile
        uses: DeterminateSystems/update-flake-lock@v20
        id: update
        with:
          commit-msg: "flake: update inputs"
          pr-title: "flake: update inputs"
          token: ${{ github.token }}

      - name: enable auto-merge
        shell: bash
        run: gh pr merge --auto --rebase "$PR_ID"
        env:
          GH_TOKEN: ${{ github.token }}
          PR_ID: ${{ steps.update.outputs.pull-request-number }}