Skip to content

Generate Go Code from plugin-pb #1029

Generate Go Code from plugin-pb

Generate Go Code from plugin-pb #1029

Workflow file for this run

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@f8d387b68d61c58ab83c6c016672934102569859 # 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@668228422ae6a00e4ad889ee87cd7109ec5666a7 # 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@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@c0f553fe549906ede9cf27b5156039d195d2ece0 # 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