Skip to content

Commit

Permalink
refactor: try role
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardobridge committed Jan 23, 2024
1 parent 7267188 commit dba3a99
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/serverless-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
# env:
# AWS_SDK_LOAD_CONFIG: 1

0 comments on commit dba3a99

Please sign in to comment.