-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (59 loc) · 2.3 KB
/
regen.yml
File metadata and controls
61 lines (59 loc) · 2.3 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Generate Go Code from plugin-pb
on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
regen:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
with:
app-id: ${{ secrets.CQ_APP_ID }}
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
id: go
with:
go-version-file: go.mod
# We use a manually configured cache key to avoid conflicts with the test action cache
# See https://github.com/actions/setup-go/issues/358
cache: false
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{runner.os}}-go-${{steps.go.outputs.go-version}}-regen-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{runner.os}}-go-${{steps.go.outputs.go-version}}-regen
- name: Install Protoc
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
version: "23.x"
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
- name: Install protoc-gen-go-grpc
run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- name: regenerate services file
run: |
make clone
make gen-proto
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
with:
# required so the PR triggers workflow runs
token: ${{ steps.app-token.outputs.token }}
branch: fix/gen_proto
base: main
title: "fix: Generate Go Code from `plugin-pb`"
commit-message: "fix: Generate Go Code from `plugin-pb`"
body: This PR was created by a scheduled workflow to regenerate the Go code from `plugin-pb`.
labels: automerge