ci: skip draft PR builds until ready

This commit is contained in:
Shantur Rathore
2026-03-22 19:30:13 +00:00
parent 51ac7f152d
commit 1f59e66065
2 changed files with 5 additions and 2 deletions

View File

@@ -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 }}

View File

@@ -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 }}