-
Notifications
You must be signed in to change notification settings - Fork 18
38 lines (34 loc) · 920 Bytes
/
getcalendar.yml
File metadata and controls
38 lines (34 loc) · 920 Bytes
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
name: Fetch the Google Calendar
on:
workflow_dispatch: # only works in default branch
push:
schedule: # only works in default branch
- cron: '50 9 * * *'
permissions:
contents: write
jobs:
fetch-calendar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Curl calendar
run: |
git config user.email "dev@community.apache.org"
git config user.name "Comdev automated workflow"
cd static/js
echo "download calendar"
bash ../../getcalendar.sh
git status
echo "preparing to push change(s)"
git add .
if git commit -m "Update calendar data (getcalendar.yml workflow)"
then
git push
echo "Changed!"
exit 0
else
echo "No change"
true # ensure success
fi
env: # for gh
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}