From: Jérôme Benoit Date: Sat, 22 Aug 2026 14:33:17 +0000 (+0200) Subject: ci: dispatch release PR checks X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=38befb535fd527c545d3bf1bde4f1a0aec1b8fbf;p=poolifier.git ci: dispatch release PR checks --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e014bd243..bc9a827a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,20 @@ on: types: [opened, synchronize, reopened] merge_group: branches: [master] + workflow_dispatch: + inputs: + pull_request: + description: Pull request number + required: true + type: string + head_ref: + description: Pull request head branch + required: true + type: string + base_ref: + description: Pull request base branch + required: true + type: string permissions: contents: read @@ -69,6 +83,9 @@ jobs: - name: SonarCloud Code Analysis if: ${{ steps.sonar-token.outputs.available == 'true' && github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '22.x' }} uses: sonarsource/sonarqube-scan-action@v8.2 + with: + args: >- + ${{ github.event_name == 'workflow_dispatch' && format('-Dsonar.pullrequest.key={0} -Dsonar.pullrequest.branch={1} -Dsonar.pullrequest.base={2}', inputs.pull_request, inputs.head_ref, inputs.base_ref) || '' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 61eae1007..40e9de71c 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -14,6 +14,7 @@ jobs: if: github.repository == 'poolifier/poolifier' permissions: + actions: write contents: write issues: write pull-requests: write @@ -28,6 +29,20 @@ jobs: config-file: .github/release-please/config.json manifest-file: .github/release-please/manifest.json + - name: Dispatch CI for release pull request + if: ${{ steps.release.outputs.prs_created == 'true' }} + env: + GH_TOKEN: ${{ github.token }} + RELEASE_PR: ${{ steps.release.outputs.pr }} + run: | + head_ref=$(jq -r '.headBranchName' <<< "$RELEASE_PR") + gh workflow run ci.yml \ + --repo "${{ github.repository }}" \ + --ref "$head_ref" \ + --field pull_request="$(jq -r '.number' <<< "$RELEASE_PR")" \ + --field head_ref="$head_ref" \ + --field base_ref="$(jq -r '.baseBranchName' <<< "$RELEASE_PR")" + build-release: needs: release-please runs-on: ubuntu-latest