Commit Graph

1 Commits

Author SHA1 Message Date
Gauvain
1996e79397 ci(build): refresh PR comment live as each build job finishes
Each build job now nudges artifact-comment.yml via `gh workflow run` when
it finishes, so the PR build-status comment reflects real per-platform
progress (e.g. Android complete while iOS still building) instead of a
single stale snapshot taken when the PR was pushed.

Why this works:
- workflow_dispatch always creates a run even when triggered by the
  GITHUB_TOKEN (unlike most events), so no PAT is needed.
- No dispatch inputs are required: artifact-comment's existing
  workflow_dispatch handler resolves the PR from the dispatched ref's
  head sha (context.sha).
- artifact-comment's concurrency group is keyed by head sha for dispatch
  runs, so cancel-in-progress collapses simultaneous nudges — the comment
  can't be spammed, the latest state always wins.

The dispatch lives in a local composite action
(.github/actions/refresh-pr-comment) so the security-sensitive call sits
in one place; each build job invokes it in a single line. The action is
guarded to same-repo pull_request runs (fork tokens are read-only and
cannot dispatch), is continue-on-error so a nudge never fails a build,
and passes head_ref via an env var (never interpolated into the shell).

Adds `actions: write` to the build jobs for the dispatch call.
2026-06-16 20:03:47 +02:00