From 00cf22983cad924e1f7e1031ff0f5e680e5bd8e2 Mon Sep 17 00:00:00 2001 From: Prakash Date: Thu, 23 May 2024 00:27:47 +0530 Subject: [PATCH] chore: use secret --- .github/workflows/deploy-to-ec2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-to-ec2.yml b/.github/workflows/deploy-to-ec2.yml index 60192a9c..352b661b 100644 --- a/.github/workflows/deploy-to-ec2.yml +++ b/.github/workflows/deploy-to-ec2.yml @@ -49,11 +49,11 @@ jobs: envs: RDS_PUBLIC_KEY script: | docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest - docker stop ${{ github.event.repository.name }}-${{vars.ENV}} || true - docker rm ${{ github.event.repository.name }}-${{vars.ENV}} || true - docker run -d -p ${{vars.PORT}}:8080 \ - --name ${{ github.event.repository.name }}-${{vars.ENV}} \ - --network=${{vars.DOCKER_NETWORK}} \ - -e RDS_PUBLIC_KEY="${RDS_PUBLIC_KEY}" \ + docker stop ${{ github.event.repository.name }}-${{ vars.ENV }} || true + docker rm ${{ github.event.repository.name }}-${{ vars.ENV }} || true + docker run -d -p ${{ vars.PORT }}:8080 \ + --name ${{ github.event.repository.name }}-${{ vars.ENV }} \ + --network=${{ vars.DOCKER_NETWORK }} \ + -e RDS_PUBLIC_KEY="${{ secrets.RDS_PUBLIC_KEY }}" \ -e API_V1_PREFIX=/api/v1 \ ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}