Skip to content

Commit

Permalink
Credentials in GH Secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
TheManWhoLikesToCode committed Jan 10, 2024
1 parent 3faeef0 commit da86ec1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
themanwholikestocode/archive-me-prod:backend-${{ github.event_name == 'pull_request' && 'development' || 'production' }}
build-args: |
CLIENT_SECRET_JSON=${{ secrets.CLIENT_SECRET_JSON }}
GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }}
frontend-build:
runs-on: ubuntu-latest
Expand Down
10 changes: 9 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ WORKDIR /backend

ADD . /backend

ARG GOOGLE_CLIENT_SECRET

ENV GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET

ARG GOOGLE_CLIENT_ID

ENV GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID

ARG CLIENT_SECRET_JSON

RUN echo "$CLIENT_SECRET_JSON" > /backend/client_secret.json
RUN echo "$CLIENT_CREDENTIALS_JSON" > /backend/credentials.json

RUN pip install -r requirements.txt

Expand Down
1 change: 0 additions & 1 deletion backend/settings.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
client_config_backend: settings
client_secrets_file: client_secrets.json
client_config:
client_id: ${GOOGLE_CLIENT_ID}
client_secret: ${GOOGLE_CLIENT_SECRET}
Expand Down

0 comments on commit da86ec1

Please sign in to comment.