-
Notifications
You must be signed in to change notification settings - Fork 135
45 lines (42 loc) · 1.12 KB
/
build.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
33
34
35
36
37
38
39
40
41
42
43
44
45
name: build
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Builder
uses: actions/checkout@v4
with:
path: build
ref: build
- name: Checkout Data
uses: actions/checkout@v4
with:
path: data
ref: master
- name: Parse
run: |
cd build
yarn install
yarn add qqwry.ipdb
yarn build
- name: Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ./data
cp ../build/data/cncity/* ./data/cncity/
cp ../build/data/country/* ./data/country/
cp ../build/data/special/* ./data/special/
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the output on this push; exiting."
exit 0
fi
git config --global user.name "github-actions[bot]"
git config --global user.email "[email protected]"
git add .
git commit -m "[auto] $(date '+%Y-%m-%d %H:%M:%S')"
git push