Skip to content

Commit bdb4e6e

Browse files
committed
Only publish latest docker images when tagged with v.docker.x.y.z
1 parent 0a790de commit bdb4e6e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
tags:
8-
- "v*"
8+
- "v.docker.*"
99
paths:
1010
- ".github/workflows/publish.yml"
1111
- "packages/**"
@@ -79,6 +79,10 @@ jobs:
7979
run: |
8080
IMAGE_TAG="${GITHUB_REF#refs/tags/}"
8181
if [[ $GITHUB_REF == refs/tags/* ]]; then
82+
if [[ $IMAGE_TAG == v.docker.* ]]; then
83+
ORIGINAL_VERSION="${IMAGE_TAG#v.docker.}"
84+
IMAGE_TAG="v${ORIGINAL_VERSION}"
85+
fi
8286
echo "IMAGE_TAG=${IMAGE_TAG}"
8387
elif [[ $GITHUB_REF == refs/heads/* ]]; then
8488
IMAGE_TAG="${GITHUB_REF#refs/heads/}"
@@ -87,8 +91,7 @@ jobs:
8791
echo "Invalid reference: ${GITHUB_REF}"
8892
exit 1
8993
fi
90-
echo ::set-output name=version::${IMAGE_TAG}
91-
94+
echo "::set-output name=version::${IMAGE_TAG}"
9295
- name: 🔢 Get the commit hash
9396
id: get_commit
9497
run: |

0 commit comments

Comments
 (0)