Skip to content

Commit

Permalink
fix: pass api key at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
gmguarino committed Apr 24, 2024
1 parent 601775c commit 4aa8e5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
password: ${{ secrets.SCALEWAY_SECRET_KEY }}
registry: ${{ secrets.SCALEWAY_CONTAINER_REGISTRY_ENDPOINT }}
- name: Build the Docker image
run: docker build . -t ${{ secrets.SCALEWAY_CONTAINER_REGISTRY_ENDPOINT }}/dataapp:latest
run: docker build . -t ${{ secrets.SCALEWAY_CONTAINER_REGISTRY_ENDPOINT }}/dataapp:latest --build-arg API_KEY=${{ secrets.PINKBOMBS_API_KEY }}
- name: Push the Docker Image
run: docker push ${{ secrets.SCALEWAY_CONTAINER_REGISTRY_ENDPOINT }}/dataapp:latest

Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.12-bookworm

ARG API_KEY=pinkbombs
ENV PINKBOMBS_API_KEY=$api_key

ENV POETRY_HOME=/app/.poetry \
POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON=1
ENV VIRTUAL_ENV /env
Expand Down

0 comments on commit 4aa8e5f

Please sign in to comment.