-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.19 KB
/
update-flake-lock.yml
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
37
38
39
40
41
name: update-flake-lock
on:
workflow_dispatch:
schedule:
- cron: '37 0 * * *'
permissions:
actions: write
contents: write
pull-requests: write
jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
with:
extra-conf: |
extra-platforms = aarch64-linux i686-linux
- name: Use cache
uses: DeterminateSystems/magic-nix-cache-action@6221693898146dc97e38ad0e013488a16477a4c4 # v9
- name: Update flake.lock
id: update
uses: DeterminateSystems/update-flake-lock@a2bbe0274e3a0c4194390a1e445f734c597ebc37 # v24
# Automerge sometimes fails. This is a workaround for the race condition.
- name: Sleep for 15 seconds
run: sleep 15
- name: Enable automerge
if: ${{ steps.update.outputs.pull-request-number != '' }}
run: gh pr merge --squash --auto ${{ steps.update.outputs.pull-request-number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}