Skip to content

Commit 77a5aa8

Browse files
feat: inject GHP_TOKEN into next-build (#699)
* add * Inject from secrets
1 parent f458995 commit 77a5aa8

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/push-landing-page-ghcr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
context: ./apps/landing-page
4545
file: ./apps/landing-page/Dockerfile
4646
push: true
47+
secrets: |
48+
github_token=${{ secrets.GHP_TOKEN }}
4749
tags: |
4850
ghcr.io/${{ github.repository }}-landing-page:latest
4951
ghcr.io/${{ github.repository }}-landing-page:${{ github.sha }}

apps/landing-page/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ COPY . .
2727
# Uncomment the following line in case you want to disable telemetry during the build.
2828
ENV NEXT_TELEMETRY_DISABLED=1
2929

30-
RUN \
30+
RUN --mount=type=secret,id=github_token \
31+
export GITHUB_TOKEN=$(cat /run/secrets/github_token) && \
3132
if [ -f yarn.lock ]; then yarn run build; \
3233
elif [ -f package-lock.json ]; then npm run build; \
3334
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \

0 commit comments

Comments
 (0)