From 36bb45c4eca0fea6e4578dcf0c0e327e8ca3d3cc Mon Sep 17 00:00:00 2001 From: Enache Adelina Date: Fri, 21 Jun 2024 11:37:03 +0300 Subject: [PATCH] handle gcp key in base64 --- .github/workflows/aws.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aws.yml b/.github/workflows/aws.yml index 33f0b50..5545a9d 100644 --- a/.github/workflows/aws.yml +++ b/.github/workflows/aws.yml @@ -72,7 +72,7 @@ jobs: # Build a docker container and # push it to ECR so that it can # be deployed to ECS. - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG --build-arg GCP_KEY ${{secrets.GCP_KEY}} . + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG --build-arg="GCP_KEY=${{secrets.GCP_KEY}}" . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT diff --git a/Dockerfile b/Dockerfile index b46f7a7..cbe19f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ COPY . . RUN pip install --no-cache-dir -r requirements.txt -RUN touch /app/key.json && echo $GCP_KEY > /app/key.json +RUN touch /app/key.json && echo $GCP_KEY | base64 --decode >> /app/key.json EXPOSE 8000