Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add api update workflow #56

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/manual-api-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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>\n<version>(.+)</version>"
version-change: minor
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4.0.4
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 }}