Skip to content

Commit e3bcf4f

Browse files
committed
Convert "version-SNAPSHOT" to "dev" tags
1 parent db0f543 commit e3bcf4f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/test_and_deploy.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
- name: Build X86 image for RONDB_VERSION_STABLE
122122
if: github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
123123
run: |
124-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
124+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
125125
docker buildx build . \
126126
--tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION \
127127
--build-arg RONDB_VERSION=$RONDB_VERSION_STABLE \
@@ -131,7 +131,7 @@ jobs:
131131
- name: Push X86 images to Dockerhub
132132
if: github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
133133
run: |
134-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
134+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
135135
docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
136136
docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION
137137
docker push hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
@@ -141,7 +141,7 @@ jobs:
141141
- name: Push X86 *latest* images to Dockerhub
142142
if: github.repository == 'logicalclocks/rondb-docker' && needs.check-git.outputs.is_highest_release == 'true'
143143
run: |
144-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
144+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
145145
docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-latest
146146
docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-latest
147147
docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME:latest
@@ -175,7 +175,7 @@ jobs:
175175
# all types of benchmarking to the tests.
176176
- name: Build and push ARM64 image for RONDB_VERSION_LTS
177177
run: |
178-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
178+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
179179
TAGS="hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION"
180180
if [[ "$is_highest_release" == "true" ]]; then
181181
TAGS+=" --tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-latest"
@@ -192,7 +192,7 @@ jobs:
192192
193193
- name: Build and push ARM64 image for RONDB_VERSION_STABLE
194194
run: |
195-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
195+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
196196
TAGS="--tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION"
197197
if [[ "$is_highest_release" == "true" ]]; then
198198
TAGS+=" --tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-latest"
@@ -228,7 +228,7 @@ jobs:
228228

229229
- name: Create and push multi-platform image
230230
run: |
231-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
231+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
232232
233233
docker buildx imagetools create -t hopsworks/rondb-standalone:$RONDB_VERSION_LTS-$VERSION \
234234
hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION \

0 commit comments

Comments
 (0)