Schedule #421
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |