diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d724c32..99d19b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,12 @@ on: pull_request: branches: - main + workflow_dispatch: + inputs: + pr_number: + description: "PR number to test (for fork PRs)" + required: true + type: string permissions: contents: read @@ -24,6 +30,8 @@ jobs: - 24.x steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }} - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: ${{ matrix.node_version }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 73da851..4674f4b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,6 +19,12 @@ on: branches: [main] schedule: - cron: "42 9 * * 5" + workflow_dispatch: + inputs: + pr_number: + description: "PR number to test (for fork PRs)" + required: true + type: string jobs: analyze: @@ -39,6 +45,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index f5c8b31..ed56dff 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -11,6 +11,12 @@ on: branches: - main - gh-pages + workflow_dispatch: + inputs: + pr_number: + description: "PR number to test (for fork PRs)" + required: true + type: string permissions: contents: read @@ -21,5 +27,6 @@ jobs: steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: + ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }} fetch-depth: 0 - uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6