From 5bbb349d8a30a1968708a9cd971b74bc39ea4b61 Mon Sep 17 00:00:00 2001 From: Waleed Date: Mon, 1 Sep 2025 13:04:16 -0700 Subject: [PATCH] fix(build): add missing pdf-parse dep, add docker build in staging (#1213) * fix(build): add missing pdf-parse dep * add docker build (no push) in staging --- .github/workflows/build.yml | 18 +++++------------- apps/sim/package.json | 1 + bun.lock | 5 +++++ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20323c87b..30d2eb260 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,7 @@ name: Build and Publish Docker Image on: push: - branches: [main] - tags: ['v*'] + branches: [main, staging] jobs: build-and-push: @@ -56,7 +55,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to the Container registry - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' uses: docker/login-action@v3 with: registry: ghcr.io @@ -70,10 +69,7 @@ jobs: images: ${{ matrix.image }} tags: | type=raw,value=latest-${{ matrix.arch }},enable=${{ github.ref == 'refs/heads/main' }} - type=ref,event=pr,suffix=-${{ matrix.arch }} - type=semver,pattern={{version}},suffix=-${{ matrix.arch }} - type=semver,pattern={{major}}.{{minor}},suffix=-${{ matrix.arch }} - type=semver,pattern={{major}}.{{minor}}.{{patch}},suffix=-${{ matrix.arch }} + type=raw,value=staging-${{ github.sha }}-${{ matrix.arch }},enable=${{ github.ref == 'refs/heads/staging' }} type=sha,format=long,suffix=-${{ matrix.arch }} - name: Build and push Docker image @@ -82,7 +78,7 @@ jobs: context: . file: ${{ matrix.dockerfile }} platforms: ${{ matrix.platform }} - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha,scope=build-v3 @@ -93,7 +89,7 @@ jobs: create-manifests: runs-on: ubuntu-latest needs: build-and-push - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' strategy: matrix: include: @@ -119,10 +115,6 @@ jobs: images: ${{ matrix.image }} tags: | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}}.{{minor}}.{{patch}} type=sha,format=long - name: Create and push manifest diff --git a/apps/sim/package.json b/apps/sim/package.json index 90728a86f..d1cf6f1b3 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -107,6 +107,7 @@ "officeparser": "^5.2.0", "openai": "^4.91.1", "papaparse": "5.5.3", + "pdf-parse": "1.1.1", "postgres": "^3.4.5", "prismjs": "^1.30.0", "react": "19.1.0", diff --git a/bun.lock b/bun.lock index 5384fc132..ab439321d 100644 --- a/bun.lock +++ b/bun.lock @@ -135,6 +135,7 @@ "officeparser": "^5.2.0", "openai": "^4.91.1", "papaparse": "5.5.3", + "pdf-parse": "1.1.1", "postgres": "^3.4.5", "prismjs": "^1.30.0", "react": "19.1.0", @@ -2644,6 +2645,8 @@ "pathval": ["pathval@2.0.1", "", {}, "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ=="], + "pdf-parse": ["pdf-parse@1.1.1", "", { "dependencies": { "debug": "^3.1.0", "node-ensure": "^0.0.0" } }, "sha512-v6ZJ/efsBpGrGGknjtq9J/oC8tZWq0KWL5vQrk2GlzLEQPUDB1ex+13Rmidl1neNN358Jn9EHZw5y07FFtaC7A=="], + "pdfjs-dist": ["pdfjs-dist@5.4.54", "", { "optionalDependencies": { "@napi-rs/canvas": "^0.1.74" } }, "sha512-TBAiTfQw89gU/Z4LW98Vahzd2/LoCFprVGvGbTgFt+QCB1F+woyOPmNNVgLa6djX9Z9GGTnj7qE1UzpOVJiINw=="], "peberminta": ["peberminta@0.9.0", "", {}, "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ=="], @@ -3816,6 +3819,8 @@ "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], + "pdf-parse/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], + "playwright/fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="], "postcss-nested/postcss-selector-parser": ["postcss-selector-parser@6.1.2", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg=="],