diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9d9698bd7..b720179076 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: branches: [main, "release/**"] pull_request: branches: [main, "release/**"] + # Required so verify + ui-smoke run on merge-queue entries; without this the + # queue would never receive these checks and enqueued PRs would hang. + merge_group: workflow_dispatch: schedule: - cron: "0 18 * * 0" diff --git a/.github/workflows/secret-scan.yml b/.github/workflows/secret-scan.yml index cd49c707f6..4ecc2290a7 100644 --- a/.github/workflows/secret-scan.yml +++ b/.github/workflows/secret-scan.yml @@ -5,6 +5,9 @@ on: branches: [main, "release/**"] pull_request: branches: [main, "release/**"] + # Required so Gitleaks runs on merge-queue entries; without this the queue + # would never receive this check and enqueued PRs would hang. + merge_group: workflow_dispatch: concurrency: @@ -28,7 +31,20 @@ jobs: fetch-depth: 0 persist-credentials: false + # gitleaks-action@v3's supportedEvents excludes merge_group; on that event + # it exits with "ERROR: The [merge_group] event is not yet supported", + # which would make the required Gitleaks check fail for every queued PR. + # Run the action for push/pull_request/dispatch, where the real scan + # happens before a PR can enter the queue. - name: Scan for secrets + if: github.event_name != 'merge_group' uses: gitleaks/gitleaks-action@v3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # In the merge queue, secrets were already scanned at pull_request time and + # merging already-scanned commits cannot introduce new secret material, so + # this satisfies the required Gitleaks check without the unsupported event. + - name: Secret scan (merge queue) + if: github.event_name == 'merge_group' + run: echo "Secrets scanned at pull_request time; gitleaks-action does not support merge_group, so the queue relies on that scan."