From b8c1b1ab6f20550bbac7239792e65b372a351492 Mon Sep 17 00:00:00 2001 From: Vishal Rao Date: Sun, 27 Sep 2026 13:14:29 +0530 Subject: [PATCH 1/3] Don't skip draft PR comment job for manual workflow trigger Also find draft PR number for a manual workflow_dispatch when the pull_request event is not available. --- .github/workflows/proposed-9.0.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/proposed-9.0.yml b/.github/workflows/proposed-9.0.yml index 42c6e083a..af759d1b9 100644 --- a/.github/workflows/proposed-9.0.yml +++ b/.github/workflows/proposed-9.0.yml @@ -26,17 +26,38 @@ jobs: comment-installer-urls: name: Comment Installer URLs needs: call-reusable-build - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest permissions: pull-requests: write steps: + - name: Find and set PR number and SHA into output vars + id: pr-info + env: + GH_TOKEN: ${{ github.token }} + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + PR_NUMBER="${{ github.event.pull_request.number }}" + HEAD_SHA="${{ github.event.pull_request.head.sha }}" + else + PR_NUMBER=$(gh pr list \ + --repo "$GITHUB_REPOSITORY" \ + --head "$GITHUB_REF_NAME" \ + --state open \ + --json number \ + --jq '.[0].number') + HEAD_SHA="$GITHUB_SHA" + fi + + echo "number=$PR_NUMBER" >> "$GITHUB_OUTPUT" + echo "sha=$HEAD_SHA" >> "$GITHUB_OUTPUT" - name: Comment installer URLs on PR + if: steps.pr-info.outputs.number != '' env: GH_TOKEN: ${{ github.token }} - PR_NUMBER: ${{ github.event.pull_request.number }} - HEAD_SHA: ${{ github.event.pull_request.head.sha }} + PR_NUMBER: ${{ steps.pr-info.outputs.number }} + HEAD_SHA: ${{ steps.pr-info.outputs.sha }} ISO_AMD64: ${{ needs.call-reusable-build.outputs.iso_amd64 }} ISO_ARM64: ${{ needs.call-reusable-build.outputs.iso_arm64 }} run: | From 5aea02eddbe21dbd2f9b6f89d223449d4df863bc Mon Sep 17 00:00:00 2001 From: Lewis Goddard Date: Sun, 27 Sep 2026 16:31:44 +0100 Subject: [PATCH 2/3] decline to run on the main branch for workflow dispatches --- .github/workflows/proposed-9.0.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/proposed-9.0.yml b/.github/workflows/proposed-9.0.yml index af759d1b9..1ac523f28 100644 --- a/.github/workflows/proposed-9.0.yml +++ b/.github/workflows/proposed-9.0.yml @@ -17,7 +17,9 @@ concurrency: jobs: call-reusable-build: - if: github.event_name != 'pull_request' || github.event.pull_request.draft == false + if: >- + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || + (github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main') uses: ./.github/workflows/build-release.yml with: stream: proposed From 38060f83fbf4b1c5425b937e4b47b6511d29319e Mon Sep 17 00:00:00 2001 From: Lewis Goddard Date: Sun, 27 Sep 2026 16:32:49 +0100 Subject: [PATCH 3/3] Remove condition for running comment-installer-urls job. We don't actually need this, as it only runs if the builds completed. --- .github/workflows/proposed-9.0.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/proposed-9.0.yml b/.github/workflows/proposed-9.0.yml index 1ac523f28..c2a1ae849 100644 --- a/.github/workflows/proposed-9.0.yml +++ b/.github/workflows/proposed-9.0.yml @@ -28,7 +28,6 @@ jobs: comment-installer-urls: name: Comment Installer URLs needs: call-reusable-build - if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest permissions: pull-requests: write