-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (38 loc) · 1.21 KB
/
update.yaml
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
name: Update
on:
push:
branches:
- master
schedule:
- cron: '*/15 * * * *'
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout OpenShift Data
uses: actions/checkout@v3
with:
repository: 'openshift/cincinnati-graph-data'
path: cincinnati-graph-data
- name: Update streams
run: .github/scripts/update_streams.sh
- name: Update data
run: .github/scripts/update_data.sh
- name: Update sitemap
run: .github/scripts/update_sitemap.sh
- name: Commit changes
run: |
git config --global user.name "GitHub update workflow"
git config --global user.email '[email protected]'
git add -A
if ! git diff --cached --exit-code; then
echo "Changes have been detected, commit and push ..."
git commit -am "Automatic update ($GITHUB_RUN_ID/$GITHUB_RUN_NUMBER)"
git log --graph --abbrev-commit --date=relative -n 5
git push
else
echo "No changes have been detected since last build, nothing to publish"
fi