Skip to content

Commit

Permalink
fix: pop REACT_APP_GITHUB_CLIENT_ID into .env file
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Horton <phorton@sonatype.com>
  • Loading branch information
madpah committed Jul 11, 2024
1 parent aad5547 commit 6b51ac7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Create .env file for Docker Build
run: echo "REACT_APP_GITHUB_CLIENT_ID=${{ secrets.REACT_APP_GITHUB_CLIENT_ID }} > .env"

- name: Build and Publish
uses: docker/build-push-action@v5
with:
build-args: 'REACT_APP_GITHUB_CLIENT_ID: ${{ secrets.REACT_APP_GITHUB_CLIENT_ID }}'
context: .
file: ./Dockerfile
platforms: linux/amd64
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#

FROM node:18-alpine3.18 as yarn-build
ARG REACT_APP_GITHUB_CLIENT_ID=FAKE_ID
LABEL stage=builder

RUN apk add --no-cache build-base
Expand All @@ -23,7 +24,7 @@ WORKDIR /src

COPY . .

RUN make yarn
RUN REACT_APP_GITHUB_CLIENT_ID=$REACT_APP_GITHUB_CLIENT_ID make yarn

FROM golang:1.21-alpine AS build
LABEL stage=builder
Expand Down

0 comments on commit 6b51ac7

Please sign in to comment.