Skip to content

Commit d1fb640

Browse files
author
ADOT Patch workflow
committed
use env vars in workflow
1 parent 35bf712 commit d1fb640

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/release-lambda.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ jobs:
2929
steps:
3030
- name: Set up regions matrix
3131
id: set-matrix
32+
env:
33+
AWS_REGIONS: ${{ github.event.inputs.aws_region }}
3234
run: |
33-
IFS=',' read -ra REGIONS <<< "${{ github.event.inputs.aws_region }}"
35+
IFS=',' read -ra REGIONS <<< "$AWS_REGIONS"
3436
MATRIX="["
3537
for region in "${REGIONS[@]}"; do
3638
trimmed_region=$(echo "$region" | xargs)
@@ -205,8 +207,11 @@ jobs:
205207
id: commit
206208
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
207209
- name: Create Release Notes
210+
env:
211+
VERSION: ${{ github.event.inputs.version }}
212+
SHA_SHORT: ${{ steps.commit.outputs.sha_short }}
208213
run: |
209-
echo "AWS OpenTelemetry Lambda Layer for Python version ${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" > release_notes.md
214+
echo "AWS OpenTelemetry Lambda Layer for Python version ${VERSION}-${SHA_SHORT}" > release_notes.md
210215
echo "" >> release_notes.md
211216
echo "" >> release_notes.md
212217
echo "See new Lambda Layer ARNs:" >> release_notes.md
@@ -218,12 +223,14 @@ jobs:
218223
id: create_release
219224
env:
220225
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
226+
VERSION: ${{ github.event.inputs.version }}
227+
SHA_SHORT: ${{ steps.commit.outputs.sha_short }}
221228
run: |
222229
gh release create --target "$GITHUB_REF_NAME" \
223-
--title "Release lambda-v${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" \
230+
--title "Release lambda-v${VERSION}-${SHA_SHORT}" \
224231
--notes-file release_notes.md \
225232
--draft \
226-
"lambda-v${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" \
233+
"lambda-v${VERSION}-${SHA_SHORT}" \
227234
layer_arns.tf layer.zip
228235
echo Removing release_notes.md ...
229236
rm -f release_notes.md

0 commit comments

Comments
 (0)