Skip to content

docs(content.proto): update comment to reflect correct message name f… #7

docs(content.proto): update comment to reflect correct message name f…

docs(content.proto): update comment to reflect correct message name f… #7

Workflow file for this run

name: Generate go code
on:
push:
branches:
- master
jobs:
generate:
name: generate
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v4
- name: setup buf
uses: bufbuild/buf-setup-action@v1
- name: configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
- name: set up golang
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: download go binaries
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
go install github.com/mwitkow/go-proto-validators/[email protected]
- name: generate go code
run: buf generate --path dictybase
- name: checkout target repo
if: success()
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: dictybase/go-genproto
path: target
- name: add git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "dictybasebot"
- name: copy generated files
run: |
rm -rf target/dictybaseapis
cp -r generated/github.com/dictyBase/go-genproto/dictybaseapis target
cd target
git add .
git diff-index --quiet HEAD || git commit -m "update on `date +"%m-%d-%Y:%H:%M:%S"`"
- name: get short sha
id: vars
run: |
sha=$(git rev-parse --short HEAD)
echo ::set-output name=id::${sha}
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
branch: chore/update-${{ steps.vars.outputs.id }}
directory: ./target
repository: dictybase/go-genproto