-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update publish to allow for manual trigger (#4820)
* chore: Update publish to allow manual trigger Signed-off-by: Francisco Javier Arceo <[email protected]> * chore: Updating publish to try and manually trigger it Signed-off-by: Francisco Javier Arceo <[email protected]> --------- Signed-off-by: Francisco Javier Arceo <[email protected]>
- Loading branch information
1 parent
fb0fb2b
commit e0b5d0c
Showing
1 changed file
with
23 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -4,11 +4,27 @@ on: | |
push: | ||
tags: | ||
- 'v*.*.*' | ||
workflow_dispatch: # Allows manual trigger of the workflow | ||
inputs: | ||
custom_version: # Optional input for a custom version | ||
description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing' | ||
required: false | ||
token: | ||
description: 'Personal Access Token' | ||
required: true | ||
default: "" | ||
type: string | ||
|
||
jobs: | ||
get-version: | ||
if: github.repository == 'feast-dev/feast' | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ github.event.inputs.token }} | ||
GIT_AUTHOR_NAME: feast-ci-bot | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: feast-ci-bot | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
outputs: | ||
release_version: ${{ steps.get_release_version.outputs.release_version }} | ||
version_without_prefix: ${{ steps.get_release_version_without_prefix.outputs.version_without_prefix }} | ||
|
@@ -17,7 +33,13 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- name: Get release version | ||
id: get_release_version | ||
run: echo ::set-output name=release_version::${GITHUB_REF#refs/*/} | ||
run: | | ||
if [[ -n "${{ github.event.inputs.custom_version }}" ]]; then | ||
echo "Using custom version: ${{ github.event.inputs.custom_version }}" | ||
echo "::set-output name=release_version::${{ github.event.inputs.custom_version }}" | ||
else | ||
echo ::set-output name=release_version::${GITHUB_REF#refs/*/} | ||
fi | ||
- name: Get release version without prefix | ||
id: get_release_version_without_prefix | ||
env: | ||
|