Skip to content

Commit 74a1aa3

Browse files
authored
Fix regions and add clarity in Lambda Layer release workflow (#255)
*Issue #, if available:* *Description of changes:* Copying this fix in Python: aws-observability/aws-otel-python-instrumentation#458 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 6becb29 commit 74a1aa3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/release-lambda.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ on:
1313

1414
env:
1515
AWS_REGIONS: ${{ github.event.inputs.aws_region }}
16-
COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, ap-southeast-5, ap-southeast-7, mx-central-1, ca-west-1, cn-north-1, cn-northwest-1
16+
# Legacy list of commercial regions to deploy to. New regions should NOT be added here, and instead should be added to the `aws_region` default input to the workflow.
17+
LEGACY_COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1
1718
LAYER_NAME: AWSOpenTelemetryDistroJs
1819

1920
permissions:
@@ -66,21 +67,21 @@ jobs:
6667
steps:
6768
- name: role arn
6869
env:
69-
COMMERCIAL_REGIONS: ${{ env.COMMERCIAL_REGIONS }}
70+
LEGACY_COMMERCIAL_REGIONS: ${{ env.LEGACY_COMMERCIAL_REGIONS }}
7071
run: |
71-
COMMERCIAL_REGIONS_ARRAY=(${COMMERCIAL_REGIONS//,/ })
72+
LEGACY_COMMERCIAL_REGIONS_ARRAY=(${LEGACY_COMMERCIAL_REGIONS//,/ })
7273
FOUND=false
73-
for REGION in "${COMMERCIAL_REGIONS_ARRAY[@]}"; do
74+
for REGION in "${LEGACY_COMMERCIAL_REGIONS_ARRAY[@]}"; do
7475
if [[ "$REGION" == "${{ matrix.aws_region }}" ]]; then
7576
FOUND=true
7677
break
7778
fi
7879
done
7980
if [ "$FOUND" = true ]; then
80-
echo "Found ${{ matrix.aws_region }} in COMMERCIAL_REGIONS"
81+
echo "Found ${{ matrix.aws_region }} in LEGACY_COMMERCIAL_REGIONS"
8182
SECRET_KEY="LAMBDA_LAYER_RELEASE"
8283
else
83-
echo "Not found ${{ matrix.aws_region }} in COMMERCIAL_REGIONS"
84+
echo "Not found ${{ matrix.aws_region }} in LEGACY_COMMERCIAL_REGIONS"
8485
SECRET_KEY="${{ matrix.aws_region }}_LAMBDA_LAYER_RELEASE"
8586
fi
8687
SECRET_KEY=${SECRET_KEY//-/_}

0 commit comments

Comments
 (0)