-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (43 loc) · 1.36 KB
/
render-template.yaml
File metadata and controls
53 lines (43 loc) · 1.36 KB
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
45
46
47
48
49
50
51
52
53
# Template-repo only: re-renders root files after Renovate updates includes/template
name: Render Template
on:
push:
branches: ['renovate/**']
paths: ['includes/**', 'template/**']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
render:
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.ref }}
token: ${{ secrets.RENOVATE_TOKEN }}
- uses: ./.github/actions/nix-setup
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Re-render from template
run: nix develop -c just render
- name: Update flake lock if inputs changed
run: |
if ! git diff --quiet flake.nix; then
nix flake lock
fi
- name: Restore copier answers
run: git restore .copier-answers.yaml
- name: Commit and push if changed
run: |
if [ -n "$(git status --porcelain)" ]; then
git add -A
git commit -m "chore: re-render root files from updated template"
git push
fi