From 925644095f1731c1ad6f7b056747ee1754750502 Mon Sep 17 00:00:00 2001 From: Mike Benowitz Date: Thu, 13 May 2021 14:32:27 -0400 Subject: [PATCH] SFR-1080 Properly handle repo secrets in actions --- .github/workflows/build-branch-qa.yaml | 3 ++- .github/workflows/build-qa.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-branch-qa.yaml b/.github/workflows/build-branch-qa.yaml index 3d70973d..f337d1ce 100644 --- a/.github/workflows/build-branch-qa.yaml +++ b/.github/workflows/build-branch-qa.yaml @@ -30,8 +30,9 @@ jobs: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: sfr_ingest_pipeline BRANCH_NAME: ${{ github.head_ref }} + AIRTABLE_KEY: ${{ secrets.AIRTABLE_API_KEY}} run: | - docker build --build-arg airtable-api-key=${{ secrets.AIRTABLE_API_KEY }} -t $ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH_NAME . + docker build --build-arg airtable-api-key=$AIRTABLE_KEY -t $ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH_NAME . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH_NAME echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH_NAME" diff --git a/.github/workflows/build-qa.yml b/.github/workflows/build-qa.yml index 1064b673..580c7af5 100644 --- a/.github/workflows/build-qa.yml +++ b/.github/workflows/build-qa.yml @@ -38,8 +38,9 @@ jobs: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: sfr-front-end IMAGE_TAG: ${{ github.sha }} + AIRTABLE_KEY: ${{ secrets.AIRTABLE_API_KEY }} run: | - docker build --build-arg airtable-api-key=${{ secrets.AIRTABLE_API_KEY }} -t $ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH_NAME . + docker build --build-arg airtable-api-key=$AIRTABLE_KEY -t $ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH_NAME . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest