Skip to content

Commit cdcb9bd

Browse files
committed
CI: modify CI version parameter
1 parent 4a53e56 commit cdcb9bd

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/ci-build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
release:
88
types:
99
- published
10+
tags:
11+
- v*
1012

1113
jobs:
1214
build-docker-images:
@@ -21,7 +23,7 @@ jobs:
2123
- name: Get Version
2224
id: get_version
2325
run: |
24-
if [[ "${{ github.ref_name }}" =~ ^[.\|v][0-9]{1,}.[0-9]{1,}[.\|-][0-9]{1,} ]];then
26+
if [[ $version =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?(-rc[0-9]+)?$ ]]; then
2527
VERSION=${{ github.ref_name }}
2628
else
2729
VERSION="latest"
@@ -37,9 +39,9 @@ jobs:
3739

3840
- name: Build Images
3941
run: |
40-
if [[ "${{ github.ref_name }}" =~ ^[.\|v][0-9]{1,}.[0-9]{1,}[.\|-][0-9]{1,} ]];then
42+
if [[ $version =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?(-rc[0-9]+)?$ ]]; then
4143
GIT_VERSION=${{ github.ref_name }}
42-
else:
44+
else
4345
GIT_VERSION=${{ steps.slug.outputs.git_revision }}
4446
fi
4547
make docker-build IMG_REGISTRY=${{ secrets.CONTAINER_REGISTRY }} VERSION=${{ steps.get_version.outputs.VERSION }}

.github/workflows/ci-chart.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
release:
55
types:
66
- published
7+
tags:
8+
- v*
79

810
permissions:
911
contents: read

0 commit comments

Comments
 (0)