diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 83e7f2e8a9c..09b20a00c12 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -84,6 +84,7 @@ jobs: - name: Upload analysis comment uses: actions/upload-artifact@v4 + if: success() && github.event.number with: name: analysis_comment.txt path: .next/analyze/__bundle_analysis_comment.txt diff --git a/.github/workflows/analyze_comment.yml b/.github/workflows/analyze_comment.yml index 1e086b9b704..5d3ce8c63ea 100644 --- a/.github/workflows/analyze_comment.yml +++ b/.github/workflows/analyze_comment.yml @@ -6,14 +6,15 @@ on: types: - completed -permissions: {} +permissions: + pull-requests: write jobs: comment: runs-on: ubuntu-latest if: > - ${{ github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' }} + github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'success' steps: - name: Download base branch bundle stats uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e