Skip to content

Commit 0dca1c2

Browse files
Refactor Github Action per b/485167538
1 parent 3f75e4d commit 0dca1c2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/run-it-tests-beam-snapshots.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
- name: Calculate Next Beam Snapshot Version
5151
id: calculate_beam_snapshot
5252
run: |
53-
if [ -n "${{ github.event.inputs.snapshot_version }}" ]; then
54-
BEAM_SNAPSHOT_VERSION="${{ github.event.inputs.snapshot_version }}"
53+
if [ -n "${GITHUB_EVENT_INPUTS_SNAPSHOT_VERSION}" ]; then
54+
BEAM_SNAPSHOT_VERSION="${GITHUB_EVENT_INPUTS_SNAPSHOT_VERSION}"
5555
echo "Using provided Beam snapshot version: $BEAM_SNAPSHOT_VERSION"
5656
else
5757
CURRENT_BEAM_VERSION=$(mvn help:evaluate -Dexpression=beam.version -q -DforceStdout)
@@ -69,10 +69,12 @@ jobs:
6969
7070
echo "beam_snapshot_version=$BEAM_SNAPSHOT_VERSION" >> $GITHUB_OUTPUT
7171
shell: bash
72+
env:
73+
GITHUB_EVENT_INPUTS_SNAPSHOT_VERSION: ${{ github.event.inputs.snapshot_version }}
7274

7375
- name: Update pom.xml for Beam Snapshot
7476
run: |
75-
SNAPSHOT_VERSION="${{ steps.calculate_beam_snapshot.outputs.beam_snapshot_version }}"
77+
SNAPSHOT_VERSION="${STEPS_CALCULATE_BEAM_SNAPSHOT_OUTPUTS_BEAM_SNAPSHOT_VERSION}"
7678
echo "Updating pom.xml to use Beam version: $SNAPSHOT_VERSION"
7779
7880
# 1. Update Beam version
@@ -98,6 +100,8 @@ jobs:
98100
echo "Final pom.xml changes:"
99101
git diff pom.xml.bak # Show changes against the original .bak file created by sed
100102
shell: bash
103+
env:
104+
STEPS_CALCULATE_BEAM_SNAPSHOT_OUTPUTS_BEAM_SNAPSHOT_VERSION: ${{ steps.calculate_beam_snapshot.outputs.beam_snapshot_version }}
101105

102106
- name: Run Build
103107
run: ./cicd/run-build

0 commit comments

Comments
 (0)