-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (66 loc) · 2.26 KB
/
Copy pathgenerate-headers.yml
File metadata and controls
80 lines (66 loc) · 2.26 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Generate app headers
# Headers are figlet banners derived from the APP= line of every script, so
# they are generated, never hand-written. They live here rather than in the
# script repos because all three repos share them byte for byte -- the same
# banner renders on Proxmox VE and on Incus.
#
# This walks the script repos, generates a header per script into
# headers/<APP_TYPE>/<slug>, and opens a PR when anything changed.
#
# Runs on a schedule, and immediately when a script repo fires a
# repository_dispatch of type "scripts-changed".
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
repository_dispatch:
types: [scripts-changed]
permissions:
contents: write
pull-requests: write
concurrency:
group: generate-headers
cancel-in-progress: false
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout core
uses: actions/checkout@v4
- name: Checkout ProxmoxVE
uses: actions/checkout@v4
with:
repository: community-scripts/ProxmoxVE
path: .src/ProxmoxVE
- name: Checkout ProxmoxVED
uses: actions/checkout@v4
with:
repository: community-scripts/ProxmoxVED
path: .src/ProxmoxVED
- name: Checkout Incus
uses: actions/checkout@v4
with:
repository: community-scripts/Incus
path: .src/Incus
- name: Install figlet
run: sudo apt-get update -qq && sudo apt-get install -y figlet
- name: Generate
run: |
set -euo pipefail
python3 .github/scripts/generate-headers.py .src/ProxmoxVE .src/ProxmoxVED .src/Incus
- name: Clean up sources
run: rm -rf .src
- name: Open a pull request
uses: peter-evans/create-pull-request@v6
with:
branch: chore/generate-headers
title: "Generate app headers"
commit-message: |
Generate app headers
Regenerated with figlet from the APP= line of every script in
ProxmoxVE, ProxmoxVED and Incus.
body: |
Regenerated automatically from the script repositories.
Headers are derived artifacts — edit the `APP=` line in the script
instead, and this workflow follows.
delete-branch: true