-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (50 loc) · 1.76 KB
/
regen.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
45
46
47
48
49
50
51
name: Generate Go Code from plugin-pb
on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:
jobs:
regen:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
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@v4
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@v2
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@v7
with:
# required so the PR triggers workflow runs
token: ${{ secrets.GH_CQ_BOT }}
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`.
author: cq-bot <cq-bot@users.noreply.github.com>
labels: automerge