From 540ccc65d1108ed5c34c33739802fa03d6c298ed Mon Sep 17 00:00:00 2001 From: Andrew Weiland Date: Thu, 16 May 2024 13:29:31 -0400 Subject: [PATCH] fixed alias --- .github/workflows/pr-open.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index c2bb6f8bfce..22578e730c9 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -49,9 +49,11 @@ jobs: curl -Lo copilot https://github.com/aws/copilot-cli/releases/latest/download/copilot-linux && chmod +x copilot && sudo mv copilot /usr/local/bin/copilot && copilot -v - name: Create secrets for environment + # Each env needs a secret. This is a copilot limitation. So the baseline secret + # is copied and tagged properly for copilot to pick it up. run: | - SECRET_STRING=$(aws secretsmanager get-secret-value --secret-id cmiml-feature) - aws secretsmanager create-secret --name cmiml-feature-${{ env.ENV_NAME }} --secret-string '$SECRET_STRING' --kms-key-id aws/secretsmanager --tags "Key=copilot-application,Value=${{ env.APP_NAME }}" "Key=copilot-environment,Value=${{ env.ENV_NAME }}" + SECRET_STRING=$(aws secretsmanager get-secret-value --secret-id cmiml-feature-feature) + aws secretsmanager create-secret --name cmiml-feature-${{ env.ENV_NAME }} --secret-string '$SECRET_STRING' --kms-key-id alias/aws/secretsmanager --tags "Key=copilot-application,Value=${{ env.APP_NAME }}" "Key=copilot-environment,Value=${{ env.ENV_NAME }}" - uses: actions/checkout@v4 name: Checkout @@ -143,6 +145,12 @@ jobs: message: | :x: Integration tests failed comment_tag: taf-results + - name: Fail + if: steps.taf-tests.outcome != 'success' && github.event_name == 'pull_request' + uses: actions/github-script@v3 + with: + script: | + core.setFailed('Unit tests failed') - name: Collect artifacts uses: actions/upload-artifact@v4