Skip to content

Commit 73954bc

Browse files
committed
add possibilty to skip branch check
1 parent aa12cb8 commit 73954bc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/release-source.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
type: string
1313
description: 'The version to release'
1414
required: true
15+
skip_branch_check:
16+
description: 'Skip the branch check'
17+
required: false
18+
type: boolean
19+
default: false
1520

1621
permissions:
1722
contents: write
@@ -39,10 +44,10 @@ jobs:
3944
echo "release_version input is empty"
4045
exit 1
4146
fi
42-
- name: check branch
43-
if: ${{ github.ref_name != 'develop' }}
47+
- name: Check branch
48+
if: ${{ inputs.skip_branch_check != true && github.ref_name != 'develop' }}
4449
run: |
45-
echo 'only the develop branch can be released.'
50+
echo 'Branch check is enabled: only the develop branch can be released.'
4651
exit 1
4752
# checkout specific repository
4853
- name: checkout repository

0 commit comments

Comments
 (0)