-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (34 loc) · 1.19 KB
/
update.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
42
name: Update
on:
schedule:
- cron: '0 4 * * 5'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update Erlang and Elixir
run: nix run ./dev#update-beam --update-input nixpkgs --no-write-lock-file
continue-on-error: true
id: updated
- name: Roll back if there is no modification
run: git reset --hard ${{ github.sha }}
if: ${{ steps.updated.outcome == 'failure' }}
- uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7
with:
commit-message: 'Update'
# Use a fine-grained personal access token that can trigger other
# workflows
token: ${{ secrets.PAT_FOR_PR }}
base: master
title: 'chore: Update flake inputs'
branch: create-pull-request/update
labels: automation,update