Skip to content

Commit 34cb0c8

Browse files
committed
Add UI refresh pipeline
1 parent 2df5345 commit 34cb0c8

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@ on:
88
push:
99
branches:
1010
- main
11+
workflow_run:
12+
workflows:
13+
- UI refresh pipeline
14+
types:
15+
- completed
1116
workflow_dispatch:
1217

1318
jobs:
1419
build:
20+
if: |
21+
github.event_name != 'workflow_run'
22+
|| github.event.workflow_run.conclusion == 'success'
1523
runs-on: ubuntu-latest
1624

1725
steps:

.github/workflows/ui-refresh.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: UI refresh pipeline
2+
3+
on:
4+
schedule:
5+
- cron: '49 4 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
ui-refresh:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out repository code
14+
uses: actions/checkout@v6
15+
16+
- name: Randomize heading color
17+
run: |
18+
R=$((RANDOM%256))
19+
G=$((RANDOM%256))
20+
B=$((RANDOM%256))
21+
NEW_COLOR=$(printf '%02x%02x%02x' "$R" "$G" "$B")
22+
MARKER='0a271319-b06c-4e46-b24c-0fde677cf461'
23+
sed -iE "s/[0-9a-f]\{6\}; \/\* $MARKER/$NEW_COLOR; \/\* $MARKER/g" static/style.css
24+
25+
- name: Commit and push changes
26+
uses: stefanzweifel/git-auto-commit-action@v7
27+
with:
28+
commit_message: 'Refresh UI'

0 commit comments

Comments
 (0)