Skip to content

Commit

Permalink
feat(gh): add workflow to trigger go grpc client update (#1198)
Browse files Browse the repository at this point in the history
* feat(gh): add workflow to trigger grpc client update

* refactor(gh/release-clients): move name field

* fix(gh): move client workflow

* fix(gh): change job name to clients

* chore(gh): moving clients again to try and fix Actions tab

* fix(gh): rename workflow again

* fix(gh): update job name

* fix(gh): add push trigger to wake gh up

* fix(gh): pass -R to gh workflow run

* fix(gh): remove duplicate workflow

* fix(gh): reference correct target workflow

* feat(gh): release client triggers on workflow or release

* fix(gh): when event is release use GITHUB_REF for tag
  • Loading branch information
GeorgeMac committed Dec 6, 2022
1 parent e1c0e8d commit 3a1235c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release-clients.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Flipt release version tag to generate
required: true

name: Release Updates to GRPC Clients
jobs:
release_client:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.FLIPT_RELEASE_BOT_APP_ID }}
private_key: ${{ secrets.FLIPT_RELEASE_BOT_APP_PEM }}
installation_id: ${{ secrets.FLIPT_RELEASE_BOT_INSTALLATION_ID }}
- name: Trigger Workflow (Dispatch)
if: ${{ github.event_name == "workflow_dispatch" }}
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
gh workflow run proto-upgrade.yml -R flipt-io/flipt-grpc-go -f tag="${{ inputs.tag }}"
- name: Trigger Workflow (Release)
if: ${{ github.event_name == "release" }}
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
tag=$(echo $GITHUB_REF | sed 's#refs/tags/##')
gh workflow run proto-upgrade.yml -R flipt-io/flipt-grpc-go -f tag="${tag}"

0 comments on commit 3a1235c

Please sign in to comment.