Skip to content

Commit

Permalink
feat(github): add flipt tag driven protobuf generate action
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeMac committed Dec 1, 2022
1 parent e7bd10c commit 89958eb
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/proto-upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
on:
workflow_dispatch:

inputs:
tag:
required: true
description: Flipt release version tag to generate

permissions:
contents: write
pull-requests: write

name: proto-upgrade
jobs:
proto-upgrade:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Setup go-task/task
use: 'lagren/setup-task@v1'

- name: Clone Flipt into sub-directory
run: gh repo clone flipt-io/flipt

- name: Bootstrap Tools
run: |
pushd ./flipt
git checkout ${{ inputs.tag }}
task bootstrap
popd
- name: Buf Generate
run: buf generate

- name: Remove Flipt
run: rm -rf ./flipt/

- name: Prepare Branch
run: |
git checkout -b "generate/${{ inputs.tag }}"
git add .
git commit -m "feat: updates to protobuf definitions for flipt ${{ inputs.tag }}"
git push origin "generate/${{ inputs.tag }}"
gh pr create --fill
10 changes: 10 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1
plugins:
- name: go
out: .
opt:
- paths=source_relative
- name: go-grpc
out: .
opt:
- paths=source_relative
3 changes: 3 additions & 0 deletions buf.work.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v1
directories:
- flipt/rpc/flipt
Empty file modified flipt.pb.go
100755 → 100644
Empty file.

0 comments on commit 89958eb

Please sign in to comment.