From dba3a99085d5a61aea09fa1d7b86a8d16686acc7 Mon Sep 17 00:00:00 2001 From: Bernardo Guerreiro Date: Tue, 23 Jan 2024 16:29:26 +0000 Subject: [PATCH] refactor: try role --- .github/workflows/serverless-deploy.yaml | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/serverless-deploy.yaml b/.github/workflows/serverless-deploy.yaml index a298012..22518f3 100644 --- a/.github/workflows/serverless-deploy.yaml +++ b/.github/workflows/serverless-deploy.yaml @@ -55,22 +55,22 @@ jobs: role-to-assume: ${{ secrets.AWS_DEPLOYER_ROLE }} role-session-name: OIDCSession mask-aws-account-id: true - - name: Serverless OIDC Login #https://github.com/thomasmichaelwallace/serverless-better-credentials?tab=readme-ov-file#troubleshooting - run: | - mkdir -p ~/.aws - rm -rf ~/.aws/credentials - echo "[default]" >> ~/.aws/credentials - echo "aws_access_key_id = ${AWS_ACCESS_KEY_ID}" >> ~/.aws/credentials - echo "aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY}" >> ~/.aws/credentials - echo "aws_session_token = ${AWS_SESSION_TOKEN}" >> ~/.aws/credentials - echo "region = eu-west-2" >> ~/.aws/credentials - echo "output = json" >> ~/.aws/credentials + # - name: Serverless OIDC Login #https://github.com/thomasmichaelwallace/serverless-better-credentials?tab=readme-ov-file#troubleshooting + # run: | + # mkdir -p ~/.aws + # rm -rf ~/.aws/credentials + # echo "[default]" >> ~/.aws/credentials + # echo "aws_access_key_id = ${AWS_ACCESS_KEY_ID}" >> ~/.aws/credentials + # echo "aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY}" >> ~/.aws/credentials + # echo "aws_session_token = ${AWS_SESSION_TOKEN}" >> ~/.aws/credentials + # echo "region = eu-west-2" >> ~/.aws/credentials + # echo "output = json" >> ~/.aws/credentials # - name: Serverless Authentication # run: npx serverless config credentials --provider aws --key ${{ env.AWS_ACCESS_KEY_ID }} --secret ${{ env.AWS_SECRET_ACCESS_KEY }} - name: serverless_deploy run: npm run deploy - env: - AWS_SDK_LOAD_CONFIG: 1 + # env: + # AWS_SDK_LOAD_CONFIG: 1 - name: seed_db if: ${{ github.event.inputs.SHOULD_SEED_DB == true }} run: npm run seed-db @@ -80,5 +80,5 @@ jobs: SERVICE_URL="$(npx serverless info --verbose | grep ServiceEndpoint | sed s/ServiceEndpoint\:\ //g)" # echo "::add-mask::$SERVICE_URL" echo "SERVICE_URL=$SERVICE_URL" >> "$GITHUB_OUTPUT" - env: - AWS_SDK_LOAD_CONFIG: 1 \ No newline at end of file + # env: + # AWS_SDK_LOAD_CONFIG: 1 \ No newline at end of file