-
Notifications
You must be signed in to change notification settings - Fork 13
32 lines (30 loc) · 1014 Bytes
/
update.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
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 [email protected]
node update
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
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