Skip to content

Commit

Permalink
refactor: fix inputs to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardobridge committed Jan 23, 2024
1 parent 457b2db commit a46cc4a
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/serverless-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
deploy_to_env:
runs-on: ubuntu-latest
env:
ENVIRONMENT: ${{ github.event.inputs.ENVIRONMENT }}
ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
outputs:
SERVICE_URL: ${{ steps.set_service_url.outputs.SERVICE_URL }}
steps:
Expand All @@ -59,22 +59,8 @@ 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 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
- name: seed_db
if: ${{ inputs.SHOULD_SEED_DB == true }}
run: npm run seed-db
Expand All @@ -83,6 +69,4 @@ jobs:
run: |
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
echo "SERVICE_URL=$SERVICE_URL" >> "$GITHUB_OUTPUT"

0 comments on commit a46cc4a

Please sign in to comment.