Merge pull request #58 from samkim/fix-api-workflow #2
Workflow file for this run
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
name: Update for API change | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
buftag: | ||
description: Tag or commit from https://buf.build/authzed/api/tags/main | ||
required: true | ||
type: string | ||
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: ${{ inputs.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 ${{ inputs.buftag }} | ||
branch: api-change/${{ inputs.buftag }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |