Skip to content

Commit 4eff157

Browse files
committed
ci: add update-datasources workflow
1 parent 9d65e42 commit 4eff157

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: update-datasources
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '22 5 * * *'
9+
workflow_dispatch:
10+
11+
jobs:
12+
update-all-channels:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
17+
steps:
18+
- name: checkout repository
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
20+
21+
- name: setup golang
22+
uses: actions/setup-go@v4
23+
with:
24+
go-version-file: go.mod
25+
26+
- name: update datasource files
27+
run: ./generate.sh
28+
29+
- name: commit changes
30+
if: github.event_name != 'push'
31+
uses: planetscale/ghcommit-action@d4176bfacef926cc2db351eab20398dfc2f593b5 # v0.2.0
32+
with:
33+
commit_message: "🤖 Re-generate GKE datasource files"
34+
repo: ${{ github.repository }}
35+
branch: main
36+
env:
37+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)