Skip to content

Commit d194483

Browse files
committed
fix: Updating workflow tagging for correct branch context
Signed-off-by: S3B4SZ17 <sebastian.zumbado@sysdig.com>
1 parent cd9414b commit d194483

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
TAG_CONTEXT: 'repo'
103103
WITH_V: true
104104
PRERELEASE_SUFFIX: "beta"
105-
PRERELEASE: ${{ (github.ref_name == 'beta') && 'true' || (github.ref_name == 'main') && 'false' || (github.ref_name == 'feat/cli-scanner-tool') && 'false' || 'true' }}
105+
PRERELEASE: ${{ (github.base_ref || github.ref_name == 'beta') && 'true' || (github.base_ref || github.ref_name == 'main') && 'false' || (github.base_ref || github.ref_name == 'feat/cli-scanner-tool') && 'false' || 'true' }}
106106

107107
- name: Summary
108108
run: |

.github/workflows/test.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ jobs:
6565
TAG=v$(grep 'version =' pyproject.toml | sed -e 's/version = "\(.*\)"/\1/')
6666
echo "TAG=$TAG" >> "$GITHUB_OUTPUT"
6767
68+
- name: Get branch ref name
69+
id: branch_ref
70+
run: |
71+
BRANCH_NAME=${{ github.base_ref || github.ref_name }}
72+
echo "$BRANCH_NAME"
73+
echo "BRANCH_NAME=$BRANCH_NAME" >> "$GITHUB_OUTPUT"
74+
6875
- name: Get tag version
6976
id: semantic_release
7077
uses: anothrNick/github-tag-action@1.71.0
@@ -74,7 +81,7 @@ jobs:
7481
TAG_CONTEXT: 'repo'
7582
WITH_V: true
7683
PRERELEASE_SUFFIX: "beta"
77-
PRERELEASE: ${{ (github.base_ref == 'beta') && 'true' || (github.base_ref == 'main') && 'false' || (github.base_ref == 'integration') && 'false' || 'true' }}
84+
PRERELEASE: ${{ (github.base_ref || github.ref_name == 'beta') && 'true' || (github.base_ref || github.ref_name == 'main') && 'false' || (github.base_ref || github.ref_name == 'integration') && 'false' || 'true' }}
7885
DRY_RUN: true
7986

8087
- name: Compare versions

0 commit comments

Comments
 (0)