From f5e50200031bdab74ed4ed9a3c0b67c8325e5999 Mon Sep 17 00:00:00 2001 From: Malik Parvez <84777619+malikparvez@users.noreply.github.com> Date: Fri, 12 Jul 2024 19:13:54 +0530 Subject: [PATCH] Adding secrets --- .github/workflows/deploy.yml | 8 +++++++- serverless.yml | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c3d17a3..f94f92b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,7 +37,13 @@ jobs: run: npm ci - name: Deploy Lambda function + env: + AWS_ACCESS_KEY: ${{ secrets.MY_AWS_ACCESS_KEY }} + AWS_SECRET_KEY: ${{ secrets.MY_AWS_SECRET_KEY }} + OPENSEARCH_HOST: ${{ secrets.OPENSEARCH_HOST }} + OPENSEARCH_USERNAME: ${{ secrets.OPENSEARCH_USERNAME }} + OPENSEARCH_PASSWORD: ${{ secrets.OPENSEARCH_PASSWORD }} + BUCKET_NAME: ${{ secrets.BUCKET_NAME }} run: | npx serverless deploy --stage dev --verbose npx serverless info --stage dev - diff --git a/serverless.yml b/serverless.yml index 6b91c4e..4913766 100644 --- a/serverless.yml +++ b/serverless.yml @@ -8,11 +8,11 @@ provider: runtime: python3.11 environment: PYTHONPATH: ./src - MY_AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} - MY_AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} - OPENSEARCH_HOST: ${{ secrets.OPENSEARCH_HOST }} - OPENSEARCH_USERNAME: ${{ secrets.OPENSEARCH_USERNAME }} - OPENSEARCH_PASSWORD: ${{ secrets.OPENSEARCH_PASSWORD }} + MY_AWS_ACCESS_KEY: ${env:MY_AWS_ACCESS_KEY_ID} + MY_AWS_SECRET_KEY: ${env:MY_AWS_SECRET_ACCESS_KEY} + OPENSEARCH_HOST: ${env:OPENSEARCH_HOST} + OPENSEARCH_USERNAME: ${env:OPENSEARCH_USERNAME} + OPENSEARCH_PASSWORD: ${env:OPENSEARCH_PASSWORD} region: ap-south-1 iam: role: