Skip to content

Commit 343cb6d

Browse files
authored
fix(ci): create one layer artifact per region & merge (#2095)
* chore(ci): restore layer arn artifact uploads * chore(ci): step name * chore(ci): remove artifact name * chore(ci): remove trailing slash from path * chore(ci): add comment
1 parent b395d9a commit 343cb6d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/publish_layer.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ jobs:
9494
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
9595
with:
9696
ref: ${{ github.sha }}
97-
- name: Download CDK layer artifact
97+
- name: Download CDK layer artifacts
9898
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
9999
with:
100-
name: cdk-layer-stack
101-
path: cdk-layer-stack/
100+
path: cdk-layer-stack
101+
pattern: cdk-layer-stack-* # merge all Layer artifacts created per region earlier (reusable_deploy_layer_stack.yml; step "Save Layer ARN artifact")
102+
merge-multiple: true
102103
- name: Replace layer versions in documentation
103104
run: |
104105
ls -la cdk-layer-stack/

.github/workflows/reusable_deploy_layer_stack.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,9 @@ jobs:
9393
if: ${{ inputs.stage == 'PROD' }}
9494
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
9595
with:
96-
name: cdk-layer-stack
96+
name: cdk-layer-stack-${{ matrix.region }}
9797
path: ./cdk-layer-stack/* # NOTE: upload-artifact does not inherit working-directory setting.
9898
if-no-files-found: error
9999
retention-days: 1
100-
overwrite: true
101100
- name: CDK deploy canary
102101
run: npm run cdk -w layers -- deploy --app cdk.out --context region=${{ matrix.region }} 'CanaryStack' --require-approval never --verbose --outputs-file cdk-outputs.json

0 commit comments

Comments
 (0)