-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (41 loc) · 1.42 KB
/
proto-upgrade.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
on:
workflow_dispatch:
inputs:
tag:
description: Flipt release version tag to generate
required: true
permissions:
contents: write
pull-requests: write
name: proto-upgrade
jobs:
proto-upgrade:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: bufbuild/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate
run: |
buf generate buf.build/flipt-io/flipt
buf generate buf.build/gnostic/gnostic
rm src/Flipt.Grpc/Discovery.cs src/Flipt.Grpc/Openapiv2.cs
- name: Prepare Branch
env:
GIT_AUTHOR_NAME: flipt-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: flipt-bot
GIT_COMMITTER_EMAIL: [email protected]
GH_TOKEN: ${{ github.token }}
run: |
git pull origin main
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
BRANCH_NAME="generate/${{ inputs.tag }}-${TIMESTAMP}"
git checkout -b "${BRANCH_NAME}"
git add --all .
git commit -m "feat: updates to protobuf definitions for flipt ${{ inputs.tag }}"
git push origin "${BRANCH_NAME}"
gh pr create --title "feat: updates to protobuf definitions for flipt ${{ inputs.tag }}" \
--body "Upgrading generated client to the protobuf definitions found in Flipt ${{ inputs.tag }}."