-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from samkim/fix-api-workflow-4
Enable automatic updates of client lib in response to api_update
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |