⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
ci: switch docker build-push secret input from secrets to secret-files
justin8021da9a28c6
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.ymlindex 9dc4c695c..70ad21bca 100644--- a/.github/workflows/docker.yml+++ b/.github/workflows/docker.yml@@ -60,6 +60,18 @@ jobs:type=raw,value=${{ inputs.version }}type=raw,value=latest,enable=${{ inputs.latest }}+ # The web Dockerfile mounts SENTRY_AUTH_TOKEN from a BuildKit secret+ # so it never lands in image metadata. This step writes the secret to a+ # file that build-push-action exposes to the build at runtime.+ - name: Prepare Sentry auth token for source-map upload+ if: matrix.dockerfile == './apps/web/Dockerfile'+ env:+ SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}+ run: |+ mkdir -p /tmp/sentry-build-secrets+ printf '%s' "$SENTRY_AUTH_TOKEN" > /tmp/sentry-build-secrets/SENTRY_AUTH_TOKEN+ chmod 600 /tmp/sentry-build-secrets/SENTRY_AUTH_TOKEN+- name: Build and pushuses: docker/build-push-action@v7with:@@ -71,6 +83,14 @@ jobs:labels: ${{ steps.meta.outputs.labels }}cache-from: type=ghacache-to: type=gha,mode=max+ build-args: |+ SENTRY_ORG=${{ vars.SENTRY_ORG }}+ SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}+ # secret-files mounts the file CONTENTS as the secret value in the+ # build. The 'secrets:' input would pass the file path string as+ # the value, which is not what BuildKit expects.+ secret-files: |+ SENTRY_AUTH_TOKEN=/tmp/sentry-build-secrets/SENTRY_AUTH_TOKENtrigger-helm-publish:needs: build-and-push-imagediff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.ymlindex c12541eec..7e0be3163 100644--- a/.github/workflows/nightly.yml+++ b/.github/workflows/nightly.yml@@ -118,6 +118,18 @@ jobs:type=raw,value=nightly-{{date 'YYYYMMDD'}}type=sha,prefix=nightly-+ # The web Dockerfile mounts SENTRY_AUTH_TOKEN from a BuildKit secret+ # so it never lands in image metadata. This step writes the secret to a+ # file that build-push-action exposes to the build at runtime.+ - name: Prepare Sentry auth token for source-map upload+ if: matrix.dockerfile == './apps/web/Dockerfile'+ env:+ SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}+ run: |+ mkdir -p /tmp/sentry-build-secrets+ printf '%s' "$SENTRY_AUTH_TOKEN" > /tmp/sentry-build-secrets/SENTRY_AUTH_TOKEN+ chmod 600 /tmp/sentry-build-secrets/SENTRY_AUTH_TOKEN+- name: Build and pushuses: docker/build-push-action@v7with:@@ -129,3 +141,8 @@ jobs:labels: ${{ steps.meta.outputs.labels }}cache-from: type=ghacache-to: type=gha,mode=max+ build-args: |+ SENTRY_ORG=${{ vars.SENTRY_ORG }}+ SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}+ secrets: |+ SENTRY_AUTH_TOKEN=/tmp/sentry-build-secrets/SENTRY_AUTH_TOKENdiff --git a/.gitignore b/.gitignoreindex c8c646dc7..68c523f73 100644--- a/.gitignore+++ b/.gitignore@@ -54,3 +54,4 @@ compose.override.yml# TanStack Router generated cacheapps/web/.tanstack/+.pi/diff --git a/apps/web/Dockerfile b/apps/web/Dockerfileindex b06fb491d..88834e575 100644--- a/apps/web/Dockerfile+++ b/apps/web/Dockerfile@@ -1,6 +1,15 @@+# syntax=docker/dockerfile:1# Build stageFROM --platform=$BUILDPLATFORM node:20-alpine AS builder+# Sentry org/project are public identifiers (not secrets). The auth token+# is the only real secret; it is mounted via `--mount=type=secret` during+# the pnpm build step so it never lands in any layer or image metadata.+ARG SENTRY_ORG+ARG SENTRY_PROJECT+ENV SENTRY_ORG=$SENTRY_ORG+ENV SENTRY_PROJECT=$SENTRY_PROJECT+# Install build dependencies in a single layerRUN apk add --no-cache python3 make g++ && \corepack enable && \@@ -31,7 +40,9 @@ RUN pnpm run build# Build the applicationWORKDIR /app/apps/web-RUN pnpm run build+RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \+ SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) \+ pnpm run build# Production stage with specific versionFROM nginx:1.29.5-alpine AS runtime