Update #35082
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: Update | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '6 * * * *' | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@v4 | |
- name: Update submodule | |
run: |- | |
git submodule update --init --recursive --remote | |
git diff --quiet && exit 0 | |
npm -C vendor/pokemon-showdown --no-package-lock --no-save --omit=optional install esbuild | |
node vendor/pokemon-showdown/build | |
- name: Fetch latest data | |
run: |- | |
git diff --quiet && exit 0 | |
npm install --no-package-lock --no-save json-stringify-pretty-compact@3.0.0 | |
node update | |
- name: Commit and push if it changed | |
run: |- | |
git config user.name "Automated" | |
git config user.email "actions@users.noreply.github.com" | |
git add -A | |
HEAD=$(git -C vendor/pokemon-showdown rev-parse HEAD | cut -c1-8) | |
git commit -m "Import smogon/pokemon-showdown@${HEAD}" || exit 0 | |
git push || exit 0 |