-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (36 loc) · 1.11 KB
/
schedule.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
name: Schedule
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn update-chain
- id: checkUpdate
name: check_for_data_updates
run: |
if GIT_CHANGES=$(git status --porcelain) && [ -z "$GIT_CHANGES" ]; then
echo "Nothing to lint. Skipping this job!"
exit 1
fi
- run: |
git config --global user.name ${GITHUB_ACTOR}
git config --global user.email [email protected]
git add ${GITHUB_WORKSPACE}/.
yarn build
git commit -m "chore: update chain data"
yarn release
git push --follow-tags
- run: gh workflow run publish.yml --ref $(git describe --tags)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.checkUpdate.conclusion == 'success'