Skip to content

Commit 73c77d5

Browse files
committed
Using $GITHUB_ENV for $X86_IMAGE_ID
1 parent 9c9d1d6 commit 73c77d5

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

.github/workflows/build_test_push.yaml

+13-22
Original file line numberDiff line numberDiff line change
@@ -204,56 +204,47 @@ jobs:
204204
if: ${{ !inputs.skip_test }}
205205
run: cat autogenerated_files/*/volumes/sysbench_single/final_result.txt
206206

207-
- name: Build X86 image
208-
if: ${{ inputs.skip_test && github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')}}
207+
- name: Get X86 image ID
209208
run: |
210209
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
211210
X86_IMAGE_NAME="${{ needs.process-info.outputs.x86_image_name }}"
211+
TAG=${{ inputs.rondb_version }}-$VERSION
212212
213+
echo "X86_IMAGE_NAME=$X86_IMAGE_NAME" >> $GITHUB_ENV
214+
echo "X86_IMAGE_ID=$X86_IMAGE_NAME:$TAG" >> $GITHUB_ENV
215+
216+
- name: Build X86 image
217+
if: ${{ inputs.skip_test && github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')}}
218+
run: |
213219
docker buildx build . \
214-
--tag $X86_IMAGE_NAME:${{ inputs.rondb_version }}-$VERSION \
220+
--tag $X86_IMAGE_ID \
215221
--build-arg RONDB_VERSION=${{ inputs.rondb_version }} \
216222
--build-arg RONDB_TARBALL_LOCAL_REMOTE=remote \
217223
--build-arg RONDB_X86_TARBALL_URI=${{ inputs.base_download_url }}/${{ inputs.rondb_x86_tarball_name }}
218224
219225
- name: Push standard versioned image
220226
if: github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
221227
run: |
222-
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
223-
224-
X86_IMAGE_NAME="${{ needs.process-info.outputs.x86_image_name }}"
225-
TAG=${{ inputs.rondb_version }}-$VERSION
228+
NEW_IMAGE_ID=hopsworks/$X86_IMAGE_ID
226229
227-
NEW_IMAGE_ID=hopsworks/$X86_IMAGE_NAME:$TAG
228-
229-
docker tag $X86_IMAGE_NAME:$TAG $NEW_IMAGE_ID
230+
docker tag $X86_IMAGE_ID $NEW_IMAGE_ID
230231
docker push $NEW_IMAGE_ID
231232
232233
- name: Push with tag `<rondb-version>-latest`
233234
# Our "latest" branch points to the latest *release* branch.
234235
if: needs.process-info.outputs.is_highest_release == 'true'
235236
run: |
236-
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
237-
238-
X86_IMAGE_NAME="${{ needs.process-info.outputs.x86_image_name }}"
239-
TAG=${{ inputs.rondb_version }}-$VERSION
240-
241237
NEW_IMAGE_ID=hopsworks/$X86_IMAGE_NAME:${{ inputs.rondb_version }}-latest
242238
243-
docker tag $X86_IMAGE_NAME:$TAG $NEW_IMAGE_ID
239+
docker tag $X86_IMAGE_ID $NEW_IMAGE_ID
244240
docker push $NEW_IMAGE_ID
245241
246242
- name: Push with tag `latest`
247243
if: ${{ needs.process-info.outputs.is_highest_release && inputs.is_latest_rondb_release }}
248244
run: |
249-
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
250-
251-
X86_IMAGE_NAME="${{ needs.process-info.outputs.x86_image_name }}"
252-
TAG=${{ inputs.rondb_version }}-$VERSION
253-
254245
NEW_IMAGE_ID=hopsworks/$X86_IMAGE_NAME:latest
255246
256-
docker tag $X86_IMAGE_NAME:$TAG $NEW_IMAGE_ID
247+
docker tag $X86_IMAGE_ID $NEW_IMAGE_ID
257248
docker push $NEW_IMAGE_ID
258249
259250
build-push-arm64:

0 commit comments

Comments
 (0)