-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (42 loc) · 1.19 KB
/
update_schema.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
on:
push:
branches:
- main
name: Update schema
jobs:
update_schema:
runs-on: ubuntu-latest
steps:
- name: clone schema
run: |
cd /tmp/
git clone https://${{ secrets.API_TOKEN_GITHUB }}@github.com/rabbit-digger/schema
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Cache Cargo
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ matrix.os }}-stable-cargo-v1
restore-keys: |
${{ matrix.os }}-stable-cargo-v1
- name: Setup toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Generate schema
uses: actions-rs/cargo@v1
with:
command: run
args: -- generate-schema /tmp/rabbit-digger-pro-schema.json
- name: Update git repo
run: |
cd /tmp/schema/
cp /tmp/rabbit-digger-pro-schema.json .
git add .
git config user.email "[email protected]"
git config user.name "spacemeowx2"
git commit -m "update at `date`" && git push || true