Skip to content

Commit 12c1e84

Browse files
Intermediate environment variable usage in workflows (#2617)
intermediate environment variable usage Co-authored-by: Samet Akcay <[email protected]>
1 parent edcbb67 commit 12c1e84

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/_reusable-rc-release-process.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,10 @@ jobs:
234234
runs-on: ubuntu-latest
235235
steps:
236236
- name: Record approval
237+
env:
238+
APPROVER: ${{ github.actor }}
237239
run: |
238240
echo "RC Approval Record:"
239241
echo "- Version: ${{ inputs.version }}"
240242
echo "- Timestamp: $(date -u +"%Y-%m-%dT%H:%M:%SZ")"
241-
echo "- Approver: ${{ github.actor }}"
243+
echo "- Approver: $APPROVER"

.github/workflows/_reusable-version-check.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ jobs:
8383
- uses: actions/checkout@v4
8484
- name: Validate version
8585
id: get-version
86+
env:
87+
VERSION: ${{ inputs.version || github.ref_name }}
8688
run: |
87-
VERSION="${{ inputs.version || github.ref_name }}"
88-
if ! [[ $VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$ ]]; then
89+
if ! [[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$ ]]; then
8990
echo "::error::Invalid version format. Must be vX.Y.Z or vX.Y.Z-rcN"
9091
exit 1
9192
fi

0 commit comments

Comments
 (0)