Skip to content

Commit

Permalink
chore(Github Actions, Docker): use GITHUB_TOKEN to clone clone the pr…
Browse files Browse the repository at this point in the history
…ivate repository
  • Loading branch information
bludnic committed May 22, 2024
1 parent e06b417 commit 9ce4fee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
--build-arg NEXT_PUBLIC_PROCESSOR_ENABLE_TRPC=true
--build-arg NEXT_PUBLIC_STATIC=true
--build-arg ADMIN_PASSWORD=password
--build-arg GITHUB_TOKEN=${{ secrets.PRO_GITHUB_TOKEN }}
-f pro.Dockerfile
-t opentrader/opentrader:latest .
Expand Down
8 changes: 5 additions & 3 deletions pro.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ WORKDIR /app
RUN pnpm add turbo -g
COPY . .
# Install opentrader-pro git submodule
#RUN git init
#RUN git submodule update --init --remote
RUN git clone [email protected]:bludnic/opentrader-pro.git pro
# Configure Git to use the token for GitHub
ARG GITHUB_TOKEN
RUN git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
RUN git init
RUN git submodule update --init --remote

# Lockfile is required to prune. This will override the param from .npmrc
RUN pnpm install --lockfile
Expand Down

0 comments on commit 9ce4fee

Please sign in to comment.