Skip to content

Commit 4ed5701

Browse files
authored
Update release_lambda.yml
1 parent 0a936d5 commit 4ed5701

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/release_lambda.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
aws_region:
77
description: 'Deploy to aws regions'
88
required: true
9-
default: '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, af-south-1, ap-east-1, ap-south-2, ap-southeast-3, ap-southeast-4, eu-central-2, eu-south-1, eu-south-2, il-central-1, me-central-1, me-south-1'
9+
default: 'ap-south-1, eu-south-1, us-west-2'
10+
# default: '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, af-south-1, ap-east-1, ap-south-2, ap-southeast-3, ap-southeast-4, eu-central-2, eu-south-1, eu-south-2, il-central-1, me-central-1, me-south-1'
1011

1112
env:
1213
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
@@ -56,7 +57,6 @@ jobs:
5657
needs: build-layer
5758
strategy:
5859
matrix:
59-
# aws_region: ${{ fromJson(github.event.inputs.aws_region) }}
6060
aws_region: ${{ fromJson(needs.build-layer.outputs.aws_regions_json) }}
6161
steps:
6262
- name: role arn
@@ -112,7 +112,6 @@ jobs:
112112
mkdir ${{ env.LAYER_NAME }}
113113
echo $layerARN > ${{ env.LAYER_NAME }}/${{ matrix.aws_region }}
114114
cat ${{ env.LAYER_NAME }}/${{ matrix.aws_region }}
115-
pwd
116115
- name: public layer
117116
run: |
118117
layerVersion=$(
@@ -187,17 +186,26 @@ jobs:
187186
with:
188187
name: layer.tf
189188
path: layer.tf
189+
update-layer:
190+
runs-on: ubuntu-latest
191+
needs: generate-release-note
192+
steps:
193+
- name: Checkout Repo @ SHA - ${{ github.sha }}
194+
uses: actions/checkout@v4
195+
- name: download layer.tf
196+
uses: actions/download-artifact@v3
197+
with:
198+
name: layer.tf
190199
- name: Commit changes
191200
env:
192201
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
193202
run: |
194203
git config user.name "github-actions[bot]"
195204
git config user.email "github-actions[bot]@users.noreply.github.com"
196-
git checkout -b "release-lambda-${{ github.run_id }}"
197205
mv layer.tf lambda-layer/terraform/lambda/
198206
git add lambda-layer/terraform/lambda/layer.tf
199207
git commit -m "Update Lambda layer ARNs for releasing" || echo "No changes to commit"
200-
git push --set-upstream origin "release-lambda-${{ github.run_id }}"
208+
git push
201209
- name: Create Pull Request
202210
env:
203211
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)