This is an automated email from the ASF dual-hosted git repository.

chamikara pushed a commit to branch java_expansion_service_container_snapshots
in repository https://gitbox.apache.org/repos/asf/beam.git

commit ac1f02396442f3e9a26d56a825d61354b63f81d1
Author: Chamikara Jayalath <[email protected]>
AuthorDate: Sun Oct 6 22:54:06 2024 -0700

    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 61ef31a0023..7107385c172 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 \

Reply via email to