Run script and commit every 60 minutes #464
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: Run script and commit every 60 minutes | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
jobs: | |
run-scheduled-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run build:metadata | |
run: yarn run build:metadata | |
- name: Commit changes | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email '[email protected]' | |
git add . | |
git commit -m "update metadata" || echo "No changes to commit" | |
git push |