Skip to content

Commit 3b38c69

Browse files
committed
feat: create automation for schema updates
1 parent 70889c5 commit 3b38c69

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Update Schema
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: 0 2 * * *
7+
8+
jobs:
9+
update-schema:
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Setup go
19+
uses: actions/setup-go@v3
20+
with:
21+
go-version: "1.17"
22+
23+
- name: Run go generate
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
go mod init github.com/shurcooL/githubv4
28+
go mod tidy
29+
go generate
30+
rm go.mod
31+
rm go.sum
32+
33+
- name: Create Pull Request
34+
uses: peter-evans/create-pull-request@v4
35+
with:
36+
commit-message: "chore: Update schema"
37+
delete-branch: true
38+
title: "[automation] Update with the latest schema changes"
39+
body: Automated pull request to update the schema based on detected changes.

0 commit comments

Comments
 (0)