diff --git a/.github/workflows/nextjs-bundle-analysis.yml b/.github/workflows/nextjs-bundle-analysis.yml index 0543cb4aeb..e5586be406 100644 --- a/.github/workflows/nextjs-bundle-analysis.yml +++ b/.github/workflows/nextjs-bundle-analysis.yml @@ -9,10 +9,12 @@ on: jobs: build: name: Production build + if: ${{ github.event_name == 'push' }} uses: ./.github/workflows/production-build.yml secrets: inherit analyze: needs: build + if: always() runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e1a7226ca8..42da1354ea 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -85,3 +85,12 @@ jobs: needs: build uses: ./.github/workflows/nextjs-bundle-analysis.yml secrets: inherit + + required: + needs: [lint, type-check, test, build, e2e] + if: always() + runs-on: ubuntu-latest + steps: + - name: fail if conditional jobs failed + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1