Skip to content

Commit 5d7e524

Browse files
authored
Create App_Header_Merge_update .app-headers inupdate-app-headers
1 parent ad3214a commit 5d7e524

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Update .app-headers with figlet output
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Merge main into update-app-headers"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
update-app-headers:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Ensure .app-headers file exists silently
17+
run: |
18+
if [ ! -f ct/.app-headers ]; then
19+
touch ct/.app-headers
20+
fi
21+
22+
- name: Update .app-headers with figlet output silently
23+
run: |
24+
for script in ct/*.sh; do
25+
if grep -q 'APP=' "$script"; then
26+
APP_NAME=$(grep -oP 'APP=\K\w+' "$script")
27+
figlet "$APP_NAME" >> ct/.app-headers 2>/dev/null
28+
fi
29+
done
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)