File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 5454 # --notices false \
5555 # --context env=prod
5656
57+ - name : Update context file with new version
58+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
59+ working-directory : serverless/configs
60+ env :
61+ IMAGE_TAG : " ${{ format('{0}-lambda', github.event.workflow_run.head_sha) }}"
62+ run : |
63+ yq -i '.imageTag = strenv(IMAGE_TAG)' prod.context.yaml
64+
5765 - name : Synth
5866 env :
5967 CDK_DEFAULT_ACCOUNT : ${{ secrets.AWS_ACCOUNT_ID }}
6270 cdk synth \
6371 --notices false \
6472 --context env=prod \
65- --context imageTag="${{ github.event_name == 'workflow_run' && format('{0}-lambda', github.event.workflow_run.head_sha) || 'latest-lambda' }}" \
6673 --ci \
6774 --debug \
6875 --verbose \
@@ -206,6 +213,14 @@ jobs:
206213 force-skip-oidc : false
207214 # action-timeout-s: 60
208215
216+ - name : Update context file with new version
217+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
218+ working-directory : serverless/configs
219+ env :
220+ IMAGE_TAG : " ${{ format('{0}-lambda', github.event.workflow_run.head_sha) }}"
221+ run : |
222+ yq -i '.imageTag = strenv(IMAGE_TAG)' prod.context.yaml
223+
209224 - name : Deploy
210225 env :
211226 CDK_DEFAULT_ACCOUNT : ${{ secrets.AWS_ACCOUNT_ID }}
@@ -214,7 +229,6 @@ jobs:
214229 cdk deploy \
215230 --notices false \
216231 --context env=prod \
217- --context imageTag="${{ github.event_name == 'workflow_run' && format('{0}-lambda', github.event.workflow_run.head_sha) || 'latest-lambda' }}" \
218232 --force \
219233 --app dist \
220234 --ci \
Original file line number Diff line number Diff line change 11imageUri : ghcr.io/zmynx/aws-lambda-calculator
2- imageTag : latest-lambda
2+ imageTag : " 2.1.1 "
You can’t perform that action at this time.
0 commit comments