From 24e847c384870846f6eb88c06f16ace1284d708b Mon Sep 17 00:00:00 2001 From: Danuk-Udagama Date: Wed, 21 Feb 2024 18:03:31 +0000 Subject: [PATCH] Integrated AWS secrets with the workflow --- .github/workflows/deploy-to-dev.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-to-dev.yml b/.github/workflows/deploy-to-dev.yml index e7c7f41..d3b8178 100644 --- a/.github/workflows/deploy-to-dev.yml +++ b/.github/workflows/deploy-to-dev.yml @@ -20,14 +20,13 @@ jobs: with: python-version: '3.11' - - name: Install npm dependencies + - name: Install dependencies run: | + sudo apt-get install jq npm install -g serverless npm install - - - name: Install python dependencies - run: | python -m pip install -r requirements/dev.txt + - name: Authenticate AWS uses: aws-actions/configure-aws-credentials@v4.0.2 @@ -35,11 +34,10 @@ jobs: aws-region: eu-west-1 role-to-assume: ${{ secrets.ROLE_OIDC }} + - name: Retrieve AWS secrets + run: | + aws secretsmanager get-secret-value --secret-id ${{ secrets.AWS_SECRET_ARN }} | jq -r ".SecretString" >> dev.env - - name: Retrieve github secrets and set to environment - uses: aws-actions/aws-secretsmanager-get-secrets@v2.0.1 - with: - secret-ids: | - ${{ secrets.AWS_SECRET_ARN }} +