From ac1f02396442f3e9a26d56a825d61354b63f81d1 Mon Sep 17 00:00:00 2001 From: Chamikara Jayalath Date: Sun, 6 Oct 2024 22:54:06 -0700 Subject: [PATCH] Tags Java SNAPSHOT containers with the '.dev' version --- .github/workflows/beam_Publish_Beam_SDK_Snapshots.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml b/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml index 61ef31a00239..7107385c1722 100644 --- a/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml +++ b/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml @@ -80,6 +80,13 @@ jobs: comment_phrase: ${{ matrix.job_phrase }} github_token: ${{ secrets.GITHUB_TOKEN }} github_job: ${{ matrix.job_name }} (${{ matrix.container_task }}) + - name: Find Beam Version + # We extract the Beam version here and tag the containers with it. Version will be in the form "2.xx.y.dev". + # This is needed to run pipelines that use the default environment at HEAD, for example, when a + # pipeline uses an expansion service built from HEAD. + run: | + BEAM_VERSION_LINE=$(cat gradle.properties | grep "sdk_version") + echo "BEAM_VERSION=${BEAM_VERSION_LINE#*sdk_version=}" >> $GITHUB_ENV - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: GCloud Docker credential helper @@ -102,6 +109,6 @@ jobs: arguments: | -Pjava11Home=$JAVA_HOME_11_X64 \ -Pdocker-repository-root=gcr.io/apache-beam-testing/beam-sdk \ - -Pdocker-tag-list=${{ github.sha }},latest \ + -Pdocker-tag-list=${{ github.sha }},${BEAM_VERSION},latest \ -Pcontainer-architecture-list=arm64,amd64 \ -Ppush-containers \