Skip to content

Commit 75afb22

Browse files
committed
Convert "version-SNAPSHOT" to "dev" tags
1 parent 584f0fb commit 75afb22

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
@@ -96,7 +96,7 @@ jobs:
9696
- name: Build X86 image for RONDB_VERSION_STABLE
9797
if: github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
9898
run: |
99-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
99+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
100100
docker buildx build . \
101101
--tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION \
102102
--build-arg RONDB_VERSION=$RONDB_VERSION_STABLE \
@@ -107,7 +107,7 @@ jobs:
107107
- name: Push X86 *latest* images to Dockerhub
108108
if: github.repository == 'logicalclocks/rondb-docker' && github.ref_name == 'main'
109109
run: |
110-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
110+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
111111
docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
112112
docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION
113113
docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-latest
@@ -122,7 +122,7 @@ jobs:
122122
- name: Push X86 *release* images to Dockerhub
123123
if: github.repository == 'logicalclocks/rondb-docker' && startsWith(github.ref_name, 'release-')
124124
run: |
125-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
125+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
126126
docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
127127
docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION
128128
docker push hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
@@ -151,7 +151,7 @@ jobs:
151151
# all types of benchmarking to the tests.
152152
- name: Build and push ARM64 image for RONDB_VERSION_LTS
153153
run: |
154-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
154+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
155155
TAGS="hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION"
156156
if [[ "${{ github.ref_name == 'main' }}" == "true" ]]; then
157157
TAGS+=" --tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-latest"
@@ -168,7 +168,7 @@ jobs:
168168
169169
- name: Build and push ARM64 image for RONDB_VERSION_STABLE
170170
run: |
171-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
171+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
172172
TAGS="--tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION"
173173
if [[ "${{ github.ref_name == 'main' }}" == "true" ]]; then
174174
TAGS+=" --tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-latest"
@@ -202,7 +202,7 @@ jobs:
202202

203203
- name: Create and push multi-platform image
204204
run: |
205-
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
205+
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
206206
207207
# Using $VERSION will create weird `-SNAPSHOT` tags, when in main, but we need
208208
# those Dockerhub images in order to run the main branch.

0 commit comments

Comments
 (0)