Skip to content

Commit

Permalink
SFR-1080 Properly handle repo secrets in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mwbenowitz committed May 13, 2021
1 parent 18ea831 commit 9256440
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-branch-qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9256440

Please sign in to comment.