Skip to content

ci: authenticate the protocol sync as a GitHub App - #388

Merged
Taure merged 1 commit into
mainfrom
ci/protocol-sync-github-app
Aug 6, 2026
Merged

ci: authenticate the protocol sync as a GitHub App#388
Taure merged 1 commit into
mainfrom
ci/protocol-sync-github-app

Conversation

@Taure

@Taure Taure commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Follow-on from #387, which made this workflow fail rather than skip. This gives it credentials that work.

Why an App rather than a PAT

SDK_SYNC_TOKEN was never set — that is why the workflow spent its whole life reporting success while syncing nothing. Replacing it with a PAT would have re-created the same failure mode on a timer: a PAT belongs to a person and expires, and the ghcr pull secret already took the fleet down once by lapsing at 30 days.

asobi-protocol-sync is owned by the org and mints a token per run that dies with the job. Nothing to rotate, nothing tied to one person's account.

Scoping

Each matrix leg mints a token scoped to only the repo that leg syncs (repositories: asobi-${{ matrix.sdk }}), so the unity leg cannot write to the other six. Verified that expression resolves to a real repo for all seven SDKs.

Also

The header said the credential needed "contents:write and pull-requests:write". Those are API scope names and appear nowhere in the UI that actually creates these — the form shows Contents and Pull requests dropdowns set to Read and write. The comment now says what you will actually see, so the next person setting this up does not go looking for a checkbox that does not exist.

Setup, already done

  • SDK_SYNC_APP_ID variable and SDK_SYNC_APP_PRIVATE_KEY secret are set on this repo
  • App installed on the seven asobi-* SDK repos

The credential check still fails loudly if either goes missing — including the case where the App gets uninstalled from one SDK repo, or a new SDK joins the matrix and nobody installs it there.

SDK_SYNC_TOKEN was never set, which is why this workflow spent its whole
life skipping silently. Replacing it with a PAT would have re-created the
same failure mode on a timer: a PAT belongs to a person and expires, and
the ghcr pull secret already took the fleet down once by lapsing at 30
days.

The asobi-protocol-sync App is owned by the org and mints a token per
run that dies with the job. Each matrix leg mints one scoped to just the
repo it syncs, so a leg cannot write to the other six.

The header comment also said "contents:write and pull-requests:write",
which are API scope names and appear nowhere in the UI that creates
these credentials - it now names what the App form actually shows.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

🟡 Code Coverage — 75.3%

6684 of 8876 lines covered.

@Taure
Taure merged commit 303fe61 into main Aug 6, 2026
15 checks passed
@Taure
Taure deleted the ci/protocol-sync-github-app branch August 6, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant