Skip to content

workflow test 9

workflow test 9 #3

Workflow file for this run

name: update
on:
issues:
types: opened
schedule:
- cron: '0 15 * * *'
jobs:
download:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: './package-lock.json'
- name: git fetch
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout main
git fetch
git pull origin main
- name: update
run: node scripts/update.js
- name: check changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: make history
if: steps.verify_diff.outputs.changed == 'true'
run: node scripts/history.js
- name: Push changes
if: steps.verify_diff.outputs.changed == 'true'
run: |
git add .
git commit -m 'update'
git push 'https://${{ secrets.GITHUB_TOKEN }}@github.com/taikowiki/taiko-song-database'