Skip to content

Commit 2d5fd18

Browse files
committed
ci: fresh-install post-release trigger via workflow_run (drop PAT dispatch)
The dispatch step added on the 0.0.83 train never worked: it borrowed XIM_PKGINDEX_TOKEN, whose fine-grained resource owner is the index org and therefore cannot cover this repository (HTTP 403 on every release, hidden by the non-blocking fallback). Replace it with the mechanism that needs no token at all: ci-fresh-install now declares `workflow_run: [release]` — a platform-generated event exempt from GITHUB_TOKEN trigger suppression — with a success guard on every job. `release: published` stays for manually created releases; workflow_dispatch and the daily schedule are unchanged.
1 parent 62fda42 commit 2d5fd18

2 files changed

Lines changed: 19 additions & 12 deletions

File tree

.github/workflows/ci-fresh-install.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@ name: ci-fresh-install
1111
# It runs on release publish, manual trigger, and daily schedule.
1212

1313
on:
14+
# NOTE: `release: published` never fires from the release pipeline — the
15+
# release is created by release.yml with GITHUB_TOKEN, and GitHub
16+
# suppresses workflow triggers from GITHUB_TOKEN-generated events. Kept
17+
# only for releases created manually outside the pipeline. The reliable
18+
# post-release hook is `workflow_run` below: a platform-generated event,
19+
# exempt from that suppression, and requiring no cross-repo PAT.
1420
release:
1521
types: [ published ]
22+
workflow_run:
23+
workflows: [ release ]
24+
types: [ completed ]
1625
workflow_dispatch:
1726
schedule:
1827
# Run daily at 06:00 UTC to catch issues from xlings/runner updates
@@ -28,6 +37,7 @@ jobs:
2837
# ──────────────────────────────────────────────────────────────────
2938
linux-fresh:
3039
name: Linux fresh install
40+
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
3141
runs-on: ubuntu-24.04
3242
timeout-minutes: 60
3343
env:
@@ -133,6 +143,7 @@ jobs:
133143
# ──────────────────────────────────────────────────────────────────
134144
linux-distro-matrix:
135145
name: Linux distro (${{ matrix.distro }})
146+
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
136147
runs-on: ubuntu-24.04
137148
container:
138149
image: ${{ matrix.image }}
@@ -218,6 +229,7 @@ jobs:
218229
# ──────────────────────────────────────────────────────────────────
219230
macos-fresh:
220231
name: macOS fresh install
232+
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
221233
# macos-14: the support floor (mcpp ≥0.0.50 / xlings ≥0.4.50 ship
222234
# minos=14.0 static-libc++ binaries). A fresh install passing here
223235
# is the continuous proof of the macOS 14 floor — and of host-tool
@@ -278,6 +290,7 @@ jobs:
278290
# ──────────────────────────────────────────────────────────────────
279291
windows-fresh:
280292
name: Windows fresh install
293+
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
281294
runs-on: windows-latest
282295
timeout-minutes: 30
283296
steps:

.github/workflows/release.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -738,15 +738,9 @@ jobs:
738738
bash .github/tools/bump_index.sh mcpp "${{ steps.version.outputs.version }}" \
739739
|| echo "index bump reported issues (non-blocking)"
740740
741-
# ci-fresh-install declares `on: release published`, but the release is
742-
# created with GITHUB_TOKEN and GitHub suppresses workflow triggers from
743-
# GITHUB_TOKEN-generated events — so that hook has never fired (only the
744-
# daily schedule ran it). Dispatch it explicitly with a PAT; best-effort
745-
# (the schedule remains the fallback).
746-
- name: Dispatch fresh-install verification
747-
if: ${{ env.XIM_PKGINDEX_TOKEN != '' }}
748-
env:
749-
GH_TOKEN: ${{ secrets.XIM_PKGINDEX_TOKEN }}
750-
run: |
751-
gh workflow run ci-fresh-install.yml -R "${{ github.repository }}" --ref main \
752-
|| echo "fresh-install dispatch failed (non-blocking; daily schedule covers it)"
741+
# Post-release verification (ci-fresh-install) is triggered via its
742+
# `workflow_run: [release]` hook — a platform-generated event that is
743+
# exempt from GITHUB_TOKEN trigger suppression and needs no cross-repo
744+
# PAT. (A PAT-based dispatch step lived here briefly; it never worked —
745+
# XIM_PKGINDEX_TOKEN's resource owner is the index org and cannot cover
746+
# this repository.)

0 commit comments

Comments
 (0)