0018. A workflow deploys a branch or pull request to dev
- Status: accepted
- Date: 2026-10-24
Context
ADR 0010 made just deploy dev on a laptop the only way onto Azure dev, after a first pass that rolled every pull request onto it fought local testing: there is one replica, and each push replaced what someone was testing. Since then, putting a branch on the Pixel Dev bot has needed a laptop with Docker, gh with write:packages, az on the subscription and a .env.dev, which shuts out reviewers and anyone away from the Mini. Bootstrap already gives GitHub Environment dev an OIDC identity (pixel-github-dev) with Contributor on pixel-dev, unused for CD.
Decision
- A
Deploy devworkflow (.github/workflows/deploy-dev.yml),workflow_dispatchonly, takes a pull request number, branch or SHA (empty: the branch it was run from).just deploy-remote dev <ref>starts it frommain's definition. Pushes and pull requests never start it, so ADR 0010's reason for not deploying PRs still holds: nothing replaces the dev bot unless a person asks. - It does what a Release does, for dev and without a version:
just checkon that commit, GHCR:<sha>and:dev(never:mainor:vX.Y.Z), the no-secrets image check,az containerapp updateonpixel-devwith min=max=1 in Environmentdev(refusing unless the app hasPIXEL_ENV=dev), dev slash commands, and a Sentry release in environmentdev. No changelog cut, tag or GitHub Release. No Terraform apply. - Only this repository's branches. A pull request from a fork is refused: its code would run with the Pixel Dev token. A maintainer who has read it can push it here first.
- Registration as ADR 0014, with the dev identity:
github_register_principal_idininfra/envs/devgivespixel-github-devKey Vault Secrets User ondiscord-tokenonly, and the job reads the app ID, guild and token reference from the runningpixel-dev. - Runs share one concurrency group and queue, never cancel.
just deploy devstays, for a working tree that isn't pushed.
This supersedes the "CI does not roll PRs onto dev" clause of ADR 0010. Everything else in it stands.
Consequences
- A maintainer applies
infra/envs/devonce withgithub_register_principal_idset (az identity show -g pixel-bootstrap -n pixel-github-dev --query principalId -o tsv). Until then the register job fails closed with that instruction; dev is already rolled, and Re-run failed jobs works after the apply. - Whoever can run workflows (write access) can put any branch of this repository on the Pixel Dev bot and so act as it in the test guild. That was already true of
terraform.yml's use of Environmentdev; the bot has no reach into prod. If that is too loose, add required reviewers to Environmentdev. - A deploy replaces whatever
pixel-devruns, including a laptopjust deploy dev. Say so in the team chat before running one. :devand:<sha>may be overwritten by a later build of the same SHA, as withjust deploy dev.