Add use_api feature

So that you don't _need_ to checkout (clone) the repo to the worker
This commit is contained in:
Phil Jay
2023-10-18 23:44:09 +11:00
parent 27ee2a7786
commit 8b80e08158
4 changed files with 64 additions and 11 deletions

View File

@@ -26,6 +26,10 @@ inputs:
description: 'Specify a non-default branch to use for the release tag (the one without -pre)'
required: false
type: string
use_api:
description: 'Use the GitHub API to discover current tags, which avoids the need for a git checkout, but requires `curl` and `jq`'
required: false
default: false
outputs:
current-version:
@@ -69,7 +73,9 @@ runs:
run: ${{ github.action_path }}/version-lookup.sh
shell: bash
env:
github_token: ${{ github.token }}
scheme: ${{ inputs.scheme }}
use_api: ${{ inputs.use_api }}
- id: version-increment
run: ${{ github.action_path }}/version-increment.sh
@@ -77,6 +83,8 @@ runs:
env:
current_version: ${{ steps.version-lookup.outputs.CURRENT_VERSION }}
increment: ${{ inputs.increment }}
github_token: ${{ github.token }}
pep440: ${{ inputs.pep440 }}
scheme: ${{ inputs.scheme }}
release_branch: ${{ inputs.release_branch }}
use_api: ${{ inputs.use_api }}