Skip to content

Commit

Permalink
Merge pull request #63 from samkim/fix-api-workflow-4
Browse files Browse the repository at this point in the history
 Enable automatic updates of client lib in response to api_update
  • Loading branch information
samkim authored Sep 7, 2023
2 parents 2363c74 + a3abb0b commit c3e7fe3
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/automatic-api-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Called update for API change"
on:
repository_dispatch:
types: ["api_update"]
jobs:
test:
name: "Create PR for API update"
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: "Update Buf Script"
id: buf-update
uses: authzed/actions/buf-api-update@main
with:
api-commit: "${{ github.event.client_payload.BUFTAG }}"
spec-path: build.gradle
file-format: gradle
- name: "Output update status"
env:
UPDATED_STATUS: ${{ steps.buf-update.outputs.updated }}
run: |
echo "Update status: $UPDATED_STATUS"
- name: "Update README package version"
uses: authzed/actions/semver-update@main
if: steps.buf-update.outputs.updated == 'true'
with:
sourcefile-path: README.md
version-regex: '<artifactId>authzed<\/artifactId>\s+<version>(.+)<\/version>'
version-change: minor
- name: Create Pull Request
uses: peter-evans/[email protected]
if: steps.buf-update.outputs.updated == 'true'
with:
delete-branch: "true"
title: "Update API to ${{ github.event.client_payload.BUFTAG }}"
branch: "api-change/${{ github.event.client_payload.BUFTAG }}"
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c3e7fe3

Please sign in to comment.