Skip to content

Commit 97ac033

Browse files
committed
Pass HF_TOKEN to docker build steps in deploy workflow
1 parent 3a9d707 commit 97ac033

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/deploy.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,21 @@ jobs:
8181
if: ${{ inputs.apply && !inputs.destroy }}
8282
run: |
8383
INDEX_ECR_URL="${{ steps.ecr-url.outputs.index_ecr_url }}"
84-
docker build -f Dockerfile.index -t "$INDEX_ECR_URL:${{ github.sha }}" -t "$INDEX_ECR_URL:latest" .
84+
docker build -f Dockerfile.index -t "$INDEX_ECR_URL:${{ github.sha }}" -t "$INDEX_ECR_URL:latest" --secret id=huggingface_token,env=HF_TOKEN .
8585
docker push "$INDEX_ECR_URL:${{ github.sha }}"
8686
docker push "$INDEX_ECR_URL:latest"
87+
env:
88+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
8789

8890
- name: Build and push TTC Docker image
8991
if: ${{ inputs.apply && !inputs.destroy }}
9092
run: |
9193
ECR_URL="${{ steps.ecr-url.outputs.ecr_url }}"
92-
docker build -f Dockerfile.ttc -t "$ECR_URL:${{ github.sha }}" -t "$ECR_URL:latest" .
94+
docker build -f Dockerfile.ttc -t "$ECR_URL:${{ github.sha }}" -t "$ECR_URL:latest" --secret id=huggingface_token,env=HF_TOKEN .
9395
docker push "$ECR_URL:${{ github.sha }}"
9496
docker push "$ECR_URL:latest"
97+
env:
98+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
9599

96100
- name: Terraform Plan
97101
if: ${{ !inputs.apply && !inputs.destroy }}

0 commit comments

Comments
 (0)