Fix Sentry source map upload in Docker builds
- Approve @sentry/cli and esbuild build scripts so postinstall runs - Use --mount=type=secret instead of ARG for SENTRY_AUTH_TOKEN (fixes Docker warning about secrets in build args) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
87d01b4b0d
commit
5e200c8b62
3 changed files with 17 additions and 10 deletions
9
.github/workflows/cd-apps.yml
vendored
9
.github/workflows/cd-apps.yml
vendored
|
|
@ -38,7 +38,8 @@ jobs:
|
|||
curl -sLO https://github.com/getsops/sops/releases/download/v3.9.4/sops-v3.9.4.linux.amd64
|
||||
chmod +x sops-v3.9.4.linux.amd64
|
||||
SOPS_AGE_KEY="${{ secrets.AGE_SECRET_KEY }}" ./sops-v3.9.4.linux.amd64 -d infrastructure/secrets.app.env > /tmp/secrets.env
|
||||
echo "SENTRY_AUTH_TOKEN=$(grep SENTRY_AUTH_TOKEN /tmp/secrets.env | cut -d= -f2-)" >> "$GITHUB_ENV"
|
||||
grep SENTRY_AUTH_TOKEN /tmp/secrets.env | cut -d= -f2- > /tmp/sentry_token
|
||||
echo "${{ github.sha }}" > /tmp/sentry_release
|
||||
|
||||
- uses: docker/build-push-action@v7
|
||||
with:
|
||||
|
|
@ -48,9 +49,9 @@ jobs:
|
|||
tags: |
|
||||
ghcr.io/trails-cool/${{ matrix.app }}:latest
|
||||
ghcr.io/trails-cool/${{ matrix.app }}:${{ github.sha }}
|
||||
build-args: |
|
||||
SENTRY_AUTH_TOKEN=${{ env.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_RELEASE=${{ github.sha }}
|
||||
secrets: |
|
||||
SENTRY_AUTH_TOKEN=/tmp/sentry_token
|
||||
SENTRY_RELEASE=/tmp/sentry_release
|
||||
|
||||
deploy:
|
||||
name: Deploy Apps
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue