Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/proposed-9.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,17 +28,37 @@ jobs:
comment-installer-urls:
name: Comment Installer URLs
needs: call-reusable-build
if: github.event_name == 'pull_request'
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: |
Expand Down
Loading