-
-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(workflow): generate and upload OpenAPI schema when releases are…
… created
- Loading branch information
1 parent
e06648b
commit 931ac09
Showing
2 changed files
with
33 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
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 |
---|---|---|
|
@@ -33,6 +33,22 @@ on: | |
- '!bin/install.sh' | ||
- '!bin/upgrade_containers.sh' | ||
- '!tests/**' | ||
workflow_call: | ||
inputs: | ||
release: | ||
description: 'Upload the OpenAPI schema as a release artifact' | ||
required: true | ||
type: boolean | ||
default: false | ||
tag: | ||
description: 'Tag to be used for the release' | ||
required: true | ||
type: string | ||
commit: | ||
description: 'Commit or branch name' | ||
required: false | ||
type: string | ||
default: 'master' | ||
|
||
jobs: | ||
generate-openapi-schema: | ||
|
@@ -92,3 +108,14 @@ jobs: | |
with: | ||
name: anthias-api-schema | ||
path: anthias-api-schema.json | ||
|
||
- name: Upload the OpenAPI Schema as a release artifact | ||
if: ${{ github.event_name == 'workflow_call' && inputs.release == true }} | ||
uses: ncipollo/[email protected] | ||
with: | ||
allowUpdates: true | ||
prerelease: true | ||
artifacts: anthias-api-schema.json | ||
tag: ${{ inputs.tag }} | ||
commit: ${{ inputs.commit }} | ||
|