-
Notifications
You must be signed in to change notification settings - Fork 898
44 lines (39 loc) · 1.11 KB
/
schema-generate-config.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
name: Generate config JSON schema
on:
push:
branches:
- main
paths:
- 'backend/config/*.go'
- '!backend/config/config_default.go'
- '!backend/config/**test.go'
jobs:
config:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Checkout backend
uses: actions/checkout@v4
with:
path: hanko
- name: Generate config JSON schema
working-directory: ./hanko/backend
run: |
go generate ./...
go run main.go schema generate config
- name: Commit and push to repo
working-directory: ./hanko
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
if ! git diff-index --quiet HEAD; then
git commit -m "chore: autogenerate config JSON schema"
git pull origin main --rebase
git push origin HEAD
else
echo "No changes detected, skipping commit and push."
fi