Skip to content

Commit e0b5d0c

Browse files
chore: Update publish to allow for manual trigger (feast-dev#4820)
* chore: Update publish to allow manual trigger Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> * chore: Updating publish to try and manually trigger it Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> --------- Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
1 parent fb0fb2b commit e0b5d0c

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,27 @@ on:
44
push:
55
tags:
66
- 'v*.*.*'
7+
workflow_dispatch: # Allows manual trigger of the workflow
8+
inputs:
9+
custom_version: # Optional input for a custom version
10+
description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing'
11+
required: false
12+
token:
13+
description: 'Personal Access Token'
14+
required: true
15+
default: ""
16+
type: string
717

818
jobs:
919
get-version:
1020
if: github.repository == 'feast-dev/feast'
1121
runs-on: ubuntu-latest
22+
env:
23+
GITHUB_TOKEN: ${{ github.event.inputs.token }}
24+
GIT_AUTHOR_NAME: feast-ci-bot
25+
GIT_AUTHOR_EMAIL: feast-ci-bot@willem.co
26+
GIT_COMMITTER_NAME: feast-ci-bot
27+
GIT_COMMITTER_EMAIL: feast-ci-bot@willem.co
1228
outputs:
1329
release_version: ${{ steps.get_release_version.outputs.release_version }}
1430
version_without_prefix: ${{ steps.get_release_version_without_prefix.outputs.version_without_prefix }}
@@ -17,7 +33,13 @@ jobs:
1733
- uses: actions/checkout@v4
1834
- name: Get release version
1935
id: get_release_version
20-
run: echo ::set-output name=release_version::${GITHUB_REF#refs/*/}
36+
run: |
37+
if [[ -n "${{ github.event.inputs.custom_version }}" ]]; then
38+
echo "Using custom version: ${{ github.event.inputs.custom_version }}"
39+
echo "::set-output name=release_version::${{ github.event.inputs.custom_version }}"
40+
else
41+
echo ::set-output name=release_version::${GITHUB_REF#refs/*/}
42+
fi
2143
- name: Get release version without prefix
2244
id: get_release_version_without_prefix
2345
env:

0 commit comments

Comments
 (0)