diff --git a/.github/workflows/push-landing-page-ghcr.yml b/.github/workflows/push-landing-page-ghcr.yml index 4f2d0c2b..b7a3e50e 100644 --- a/.github/workflows/push-landing-page-ghcr.yml +++ b/.github/workflows/push-landing-page-ghcr.yml @@ -44,6 +44,8 @@ jobs: context: ./apps/landing-page file: ./apps/landing-page/Dockerfile push: true + secrets: | + github_token=${{ secrets.GHP_TOKEN }} tags: | ghcr.io/${{ github.repository }}-landing-page:latest ghcr.io/${{ github.repository }}-landing-page:${{ github.sha }} diff --git a/apps/landing-page/Dockerfile b/apps/landing-page/Dockerfile index 80db0ca5..6232332c 100644 --- a/apps/landing-page/Dockerfile +++ b/apps/landing-page/Dockerfile @@ -27,7 +27,8 @@ COPY . . # Uncomment the following line in case you want to disable telemetry during the build. ENV NEXT_TELEMETRY_DISABLED=1 -RUN \ +RUN --mount=type=secret,id=github_token \ + export GITHUB_TOKEN=$(cat /run/secrets/github_token) && \ if [ -f yarn.lock ]; then yarn run build; \ elif [ -f package-lock.json ]; then npm run build; \ elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \