Skip to content

Commit 1a85b97

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

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
with:
21+
persist-credentials: false
22+
23+
- name: setup golang
24+
uses: actions/setup-go@v4
25+
with:
26+
go-version-file: go.mod
27+
cache: false
28+
29+
- name: update datasource files
30+
run: ./generate.sh
31+
32+
- name: commit changes
33+
if: github.event_name != 'push'
34+
uses: planetscale/ghcommit-action@d4176bfacef926cc2db351eab20398dfc2f593b5 # v0.2.0
35+
with:
36+
commit_message: "🤖 Re-generate GKE datasource files"
37+
repo: ${{ github.repository }}
38+
branch: main
39+
env:
40+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)