Skip to content

Commit 6632950

Browse files
authored
Merge pull request #61 from jaseci-labs/simple_tag
fix: remove support for 'v' prefixed tags in deployment conditions
2 parents d2e34d0 + eb0303a commit 6632950

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/deploy.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
deploy-littleX: # TODO: need to change the tags below
14-
if: startsWith(github.ref, 'refs/tags/littleX-') || startsWith(github.ref, 'refs/tags/v')
14+
if: startsWith(github.ref, 'refs/tags/littleX-')
1515
runs-on: ubuntu-latest
1616
outputs:
1717
tag: ${{ steps.tag.outputs.tag }}
@@ -67,11 +67,9 @@ jobs:
6767
# Release event - clean tag name
6868
TAG_NAME=${GITHUB_REF#refs/tags/}
6969
70-
# Remove prefixes: littleX-v1.2.3 -> v1.2.3 or littleX-1.2.3 -> 1.2.3
70+
# Remove prefix: littleX-v1.2.3 -> v1.2.3
7171
if [[ $TAG_NAME =~ ^littleX-(.+)$ ]]; then
7272
TAG="${BASH_REMATCH[1]}"
73-
elif [[ $TAG_NAME =~ ^v(.+)$ ]]; then
74-
TAG="$TAG_NAME"
7573
else
7674
# Use tag as-is if no prefix
7775
TAG="$TAG_NAME"
@@ -105,7 +103,7 @@ jobs:
105103
working-directory: littleX_BE
106104

107105
deploy-littleX-webapp: # TODO: need to change the tags below
108-
if: startsWith(github.ref, 'refs/tags/littleX-') || startsWith(github.ref, 'refs/tags/v')
106+
if: startsWith(github.ref, 'refs/tags/littleX-')
109107
runs-on: ubuntu-latest
110108
outputs:
111109
tag: ${{ steps.tag.outputs.tag }}
@@ -161,11 +159,9 @@ jobs:
161159
# Release event - clean tag name
162160
TAG_NAME=${GITHUB_REF#refs/tags/}
163161
164-
# Remove prefixes: littleX-v1.2.3 -> v1.2.3 or littleX-1.2.3 -> 1.2.3
162+
# Remove prefix: littleX-v1.2.3 -> v1.2.3
165163
if [[ $TAG_NAME =~ ^littleX-(.+)$ ]]; then
166164
TAG="${BASH_REMATCH[1]}"
167-
elif [[ $TAG_NAME =~ ^v(.+)$ ]]; then
168-
TAG="$TAG_NAME"
169165
else
170166
# Use tag as-is if no prefix
171167
TAG="$TAG_NAME"

0 commit comments

Comments
 (0)