File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Switch Logo
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 0 31 5 *' # Change to pride logo. “At 00:00 on day-of-month 31 in May.”
6+ - cron : ' 0 0 1 7 *' # Switch back to normal logo. “At 00:00 on day-of-month 1 in July.”
7+
8+ jobs :
9+ swap-logo :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
13+
14+ - name : Switch Logo
15+ run : |
16+ TODAY=$(date +'%m-%d')
17+ if [ "$TODAY" == "05-31" ]; then
18+ # Switch to pride logo.
19+ sed --in-place 's|/images/nix-logo\.png|/images/nix-logo-pride.png|g' frontend/src/Main.elm
20+ git_commit_message="chore(logo): use pride logo"
21+ elif [ "$TODAY" == "07-01" ]; then
22+ # Switch back to normal logo.
23+ sed --in-place 's|/images/nix-logo-pride\.png|/images/nix-logo.png|g' frontend/src/Main.elm
24+ git_commit_message="chore(logo): switch back to normal logo"
25+ else
26+ echo "No action needed for logo today."
27+ exit 0
28+ fi
29+
30+ git config --global user.name 'github-actions[bot]'
31+ git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
32+ git add frontend/src/Main.elm
33+ git commit --message "$git_commit_message"
34+ git push
You can’t perform that action at this time.
0 commit comments