fix: Enable selecting the '.NET 6 on AL2023' platform when deploying to Elastic Beanstalk on Linux #299
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Detect CDK Bootstrap Version Changes | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Install AWS CDK | |
run: | | |
npm install -g aws-cdk | |
- name: Get Staging Bucket Update/Replace Policy | |
id: stagingBucketUpdateReplacePolicy | |
run: | | |
echo "::set-output name=update-replace-policy::$(yq '.Resources.StagingBucket.UpdateReplacePolicy' 'src/AWS.Deploy.Orchestration/CDK/CDKBootstrapTemplate.yaml')" | |
- name: Get Staging Bucket Deletion Policy | |
id: stagingBucketDeletionPolicy | |
run: | | |
echo "::set-output name=deletion-policy::$(yq '.Resources.StagingBucket.DeletionPolicy' 'src/AWS.Deploy.Orchestration/CDK/CDKBootstrapTemplate.yaml')" | |
- name: Fail If Update/Replace Policy Not 'Delete' | |
if: steps.stagingBucketUpdateReplacePolicy.outputs.update-replace-policy != 'Delete' | |
run: | | |
echo "The 'UpdateReplacePolicy' of the 'StaginBucket' in the CDK bootstrap template should be 'Delete'." | |
exit 1 | |
- name: Fail If Deletion Policy Not 'Delete' | |
if: steps.stagingBucketDeletionPolicy.outputs.deletion-policy != 'Delete' | |
run: | | |
echo "The 'DeletionPolicy' of the 'StaginBucket' in the CDK bootstrap template should be 'Delete'." | |
exit 1 | |
- name: Save New CDK Bootstrap Template | |
run: | | |
cdk bootstrap --show-template > newTemplate.yml | |
- name: Get Latest CDK Bootstrap Version | |
id: latestBootstrapVersion | |
run: | | |
echo "::set-output name=latest-version::$(yq '.Resources.CdkBootstrapVersion.Properties.Value' 'newTemplate.yml')" | |
- name: Get Current CDK Bootstrap Version | |
id: currentBootstrapVersion | |
run: | | |
echo "::set-output name=current-version::$(yq '.Resources.CdkBootstrapVersion.Properties.Value' 'src/AWS.Deploy.Orchestration/CDK/CDKBootstrapTemplate.yaml')" | |
- name: Fail If CDK Bootstrap Template Changes Detected | |
if: steps.currentBootstrapVersion.outputs.current-version != steps.latestBootstrapVersion.outputs.latest-version | |
run: | | |
echo "A new version of the AWS CDK Bootstrap Template is available. The current template that is being used by the Deploy tool needs to be updated." | |
exit 1 |