|
6 | 6 | aws_region: |
7 | 7 | description: 'Deploy to aws regions' |
8 | 8 | 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' |
10 | 11 |
|
11 | 12 | env: |
12 | 13 | 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 | 57 | needs: build-layer |
57 | 58 | strategy: |
58 | 59 | matrix: |
59 | | - # aws_region: ${{ fromJson(github.event.inputs.aws_region) }} |
60 | 60 | aws_region: ${{ fromJson(needs.build-layer.outputs.aws_regions_json) }} |
61 | 61 | steps: |
62 | 62 | - name: role arn |
@@ -112,7 +112,6 @@ jobs: |
112 | 112 | mkdir ${{ env.LAYER_NAME }} |
113 | 113 | echo $layerARN > ${{ env.LAYER_NAME }}/${{ matrix.aws_region }} |
114 | 114 | cat ${{ env.LAYER_NAME }}/${{ matrix.aws_region }} |
115 | | - pwd |
116 | 115 | - name: public layer |
117 | 116 | run: | |
118 | 117 | layerVersion=$( |
@@ -187,17 +186,26 @@ jobs: |
187 | 186 | with: |
188 | 187 | name: layer.tf |
189 | 188 | 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 |
190 | 199 | - name: Commit changes |
191 | 200 | env: |
192 | 201 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
193 | 202 | run: | |
194 | 203 | git config user.name "github-actions[bot]" |
195 | 204 | git config user.email "github-actions[bot]@users.noreply.github.com" |
196 | | - git checkout -b "release-lambda-${{ github.run_id }}" |
197 | 205 | mv layer.tf lambda-layer/terraform/lambda/ |
198 | 206 | git add lambda-layer/terraform/lambda/layer.tf |
199 | 207 | 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 |
201 | 209 | - name: Create Pull Request |
202 | 210 | env: |
203 | 211 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
0 commit comments