-
Notifications
You must be signed in to change notification settings - Fork 14
44 lines (34 loc) · 1.07 KB
/
generate.yaml
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
43
44
name: Generate
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
readme:
name: README.md
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Set up magic Nix cache
uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b # v8
- name: Prepare Nix shell
run: nix develop --impure .#ci
- name: Regenerate README
run: nix develop --impure .#ci -c make generate
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Regenerate README.md
file_pattern: README.md
if: github.event_name == 'push'