-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (43 loc) · 1.33 KB
/
sync_theme.yml
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
name: sync theme submodules
on:
push:
branches: gh-pages
schedule:
- cron: "00 14 * * *"
workflow_dispatch:
jobs:
sync_theme_submodules:
if: github.repository_owner == 'ioos' # only run if ioos owns repo
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: submodule checkout
run: |
git submodule update --init
- name: check submodule status
run: |
git submodule status
- name: Update theme from submodules
run: |
git submodule update --remote --merge
- name: check submodule status 2
run: |
git submodule status
- name: Commit and push if it changed
run: |
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Update theme on: ${timestamp}" || exit 0
git push
keepalive-job:
name: Keepalive Workflow
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
permissions:
actions: write
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: gautamkrishnar/keepalive-workflow@3eb47f21355191080dca0f7662d45c192d2ef64d # 2.0.7