diff --git a/.github/workflows/comment-pr-artifacts.yml b/.github/workflows/comment-pr-artifacts.yml index 9cec0b18..86fda296 100644 --- a/.github/workflows/comment-pr-artifacts.yml +++ b/.github/workflows/comment-pr-artifacts.yml @@ -6,6 +6,7 @@ on: - opened - synchronize - reopened + - ready_for_review permissions: actions: read @@ -20,6 +21,7 @@ jobs: ALLOWED_ACTORS: ${{ vars.ALLOWED_NON_DEV_PR_ACTORS }} ACTOR: ${{ github.actor }} BASE_REF: ${{ github.event.pull_request.base.ref }} + IS_DRAFT: ${{ github.event.pull_request.draft }} PR_NUMBER: ${{ github.event.pull_request.number }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} RETENTION_DAYS: 7 @@ -42,7 +44,7 @@ jobs: fi - name: Wait for PR build and comment - if: ${{ steps.auth.outputs.allowed == 'true' }} + if: ${{ steps.auth.outputs.allowed == 'true' && env.IS_DRAFT != 'true' }} uses: actions/github-script@v8 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 1f780ffc..442055c4 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -6,6 +6,7 @@ on: - opened - synchronize - reopened + - ready_for_review permissions: contents: read @@ -45,7 +46,7 @@ jobs: build: needs: authorize - if: ${{ needs.authorize.outputs.allowed == 'true' }} + if: ${{ needs.authorize.outputs.allowed == 'true' && !github.event.pull_request.draft }} uses: ./.github/workflows/build-and-upload.yml with: ref: ${{ github.event.pull_request.head.sha }}