-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github Workflow for checking Go API compatibility on PRs
It'll automatically set the semver label for a given PR. However we don't detect (yet) whether it's in actual Gophercloud code or in the tests.
- Loading branch information
Showing
2 changed files
with
47 additions
and
21 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,47 @@ | ||
name: Add PR semver labels on push | ||
on: | ||
pull_request_target: | ||
types: [synchronize] | ||
jobs: | ||
go-apidiff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1' | ||
|
||
- name: Remove the semver label | ||
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 | ||
with: | ||
labels: | | ||
semver:patch | ||
semver:minor | ||
semver:major | ||
github_token: ${{ github.token }} | ||
|
||
- name: Checking Go API Compatibility | ||
id: go-apidiff | ||
uses: joelanford/go-apidiff@v0.7.0 | ||
|
||
- name: Add semver:patch label | ||
if: always() && steps.go-apidiff.outputs.semver-type == 'patch' | ||
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
labels: semver:patch | ||
|
||
- name: Add semver:minor label | ||
if: always() && steps.go-apidiff.outputs.semver-type == 'minor' | ||
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
labels: semver:minor | ||
|
||
- name: Add semver:major label | ||
if: always() && steps.go-apidiff.outputs.semver-type == 'major' | ||
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
labels: semver:major |
This file was deleted.
Oops, something went wrong.