Skip to content

Commit b98d539

Browse files
committed
fix: cleanup
1 parent 136d0e3 commit b98d539

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

Diff for: .github/workflows/publish_v2_layer.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ on:
1010
latest_published_version:
1111
description: "Latest PyPi published version to rebuild latest docs for, e.g. v2.0.0"
1212
required: true
13-
workflow_run:
14-
workflows: ["Publish to PyPi"]
15-
types:
16-
- completed
13+
# workflow_run:
14+
# workflows: ["Publish to PyPi"]
15+
# types:
16+
# - completed
1717

1818
jobs:
1919
build-layer:
@@ -65,8 +65,7 @@ jobs:
6565
npm install -g [email protected]
6666
cdk --version
6767
- name: CDK build
68-
run: |
69-
cdk synth --context version="$RELEASE_TAG_VERSION" -o cdk.out
68+
run: cdk synth --context version="$RELEASE_TAG_VERSION" -o cdk.out
7069
- name: zip output
7170
run: zip -r cdk.out.zip cdk.out
7271
- name: Archive CDK artifacts

Diff for: .github/workflows/reusable_deploy_v2_sar.yml

+9-11
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ jobs:
6464
with:
6565
name: ${{ inputs.artefact-name }}
6666
- name: Unzip artefact
67-
run: |
68-
unzip cdk.out.zip
69-
- name: Set SAR name
67+
run: unzip cdk.out.zip
68+
- name: Configure SAR name
7069
run: |
7170
NAME=${{ env.SAR_NAME }}
7271
if [[ "${{ inputs.stage }}" == "BETA" ]]; then
@@ -83,13 +82,6 @@ jobs:
8382
cp README.md LICENSE "./cdk.out/$asset/"
8483
sam package --template-file template.yml --output-template-file packaged.yml --s3-bucket ${{ secrets.AWS_SAR_S3_BUCKET }}
8584
sam publish --template packaged.yml --region "$AWS_REGION"
86-
- name: Publish SAR
87-
if: ${{ inputs.stage == 'PROD' }}
88-
run: |
89-
# wait until sar registers the app, otherwise it fails to make it public
90-
sleep 15
91-
echo "Make SAR app public"
92-
aws serverlessrepo put-application-policy --application-id arn:aws:serverlessrepo:${{ env.AWS_REGION }}:${{ steps.aws-credentials-sar-role.outputs.aws-account-id }}:applications/${{ env.SAR_NAME }} --statements Principals='*',Actions=Deploy
9385
- name: Deploy BETA canary
9486
if: ${{ inputs.stage == 'BETA' }}
9587
run: |
@@ -101,7 +93,6 @@ jobs:
10193
10294
echo "Check if stack does not exist"
10395
stack_exists=$(aws cloudformation list-stacks --query "StackSummaries[?(StackName == '$STACK_NAME' && StackStatus == 'CREATE_COMPLETE')].{StackId:StackId, StackName:StackName, CreationTime:CreationTime, StackStatus:StackStatus}" --output text)
104-
echo "$stack_exists"
10596
if [[ -n "$stack_exists" ]] ; then
10697
echo "Found test deployment stack, removing..."
10798
aws cloudformation delete-stack --stack-name "$STACK_NAME"
@@ -124,3 +115,10 @@ jobs:
124115
exit 1
125116
fi
126117
echo "Deployment successful"
118+
- name: Publish SAR
119+
if: ${{ inputs.stage == 'PROD' }}
120+
run: |
121+
# wait until SAR registers the app, otherwise it fails to make it public
122+
sleep 15
123+
echo "Make SAR app public"
124+
aws serverlessrepo put-application-policy --application-id arn:aws:serverlessrepo:${{ env.AWS_REGION }}:${{ steps.aws-credentials-sar-role.outputs.aws-account-id }}:applications/${{ env.SAR_NAME }} --statements Principals='*',Actions=Deploy

0 commit comments

Comments
 (0)