Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
86LAK authored May 1, 2024
1 parent 05f5fa7 commit b2bbbd7
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Configure AWS credentials
id: aws-credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_SESSION_TOKEN }}
- uses: actions/checkout@v3

- name: Mask AWS credentials
run: |
echo "AWS_ACCESS_KEY_ID=${{ steps.aws-credentials.outputs.access_key_id }}" | sed 's/./\*/g' >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ steps.aws-credentials.outputs.secret_access_key }}" | sed 's/./\*/g' >> $GITHUB_ENV
echo "AWS_SESSION_TOKEN=${{ steps.aws-credentials.outputs.session_token }}" | sed 's/./\*/g' >> $GITHUB_ENV
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Deploy to AWS
run: |
echo "${{ github.event.inputs.awsCredentials }}" | sed 's/./\*/g' > credentials.txt
export $(cat credentials.txt | xargs)
echo "::add-mask::$(cat credentials.txt)"
./deploy.sh
- name: Deploy to AWS
run: |
echo "${{ github.event.inputs.awsCredentials }}" | tr " " "\n" > credentials
export $(cat credentials.txt | xargs)
echo "::add-mask::$(cat credentials.txt)"
rm credentials.txt
./deploy.sh

0 comments on commit b2bbbd7

Please sign in to comment.