mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
chore: build main-head on PR merge (#302)
* chore: add main branch Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com> * ci: add dev branch Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com> --------- Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
parent
cbfcf4dbae
commit
4f3e532327
10
.github/workflows/build-extension-on-merge.yml
vendored
10
.github/workflows/build-extension-on-merge.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- 'release-harvester-v*'
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
setup-target-branch:
|
||||
@ -17,14 +18,17 @@ jobs:
|
||||
- name: Determine target branch
|
||||
id: get-version
|
||||
run: |
|
||||
if [[ "${{ github.ref_name }}" =~ ^release-harvester-v([0-9]+\.[0-9]+)$ ]]; then
|
||||
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
||||
TARGET_BRANCH="main-head"
|
||||
elif [[ "${{ github.ref_name }}" =~ ^release-harvester-v([0-9]+\.[0-9]+)$ ]]; then
|
||||
TARGET_BRANCH="v${BASH_REMATCH[1]}-head"
|
||||
echo "target_branch=${TARGET_BRANCH}" >> $GITHUB_ENV
|
||||
echo "target_branch=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Error: invalid branch format." && exit 1
|
||||
fi
|
||||
|
||||
echo "target_branch=${TARGET_BRANCH}" >> $GITHUB_ENV
|
||||
echo "target_branch=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Ensure target branch exists
|
||||
run: |
|
||||
git fetch --all
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user