Run reusable Codex Cloud prompts from GitHub Actions.
-
Create a Codex Cloud environment whose label matches each
owner/repository, or set an explicitenvironmentinautomations.yaml. -
Install Poetry, Python 3.13, and Node.js 22 for local validation.
-
Add the local Codex authentication document as an Actions secret:
gh secret set CODEX_AUTH_JSON < ~/.codex/auth.json
Repositories created from this template must set their own secret.
version: 1
repositories:
self:
branch: main
automations:
hello-world:
prompt: examples/hello-world
skills:
- examples/conciseself resolves to the current GitHub repository. Prompt and skill references such as foo/bar load
prompts/foo/bar.md and skills/foo/bar.md. Add schedule.cron and schedule.timezone for scheduled
runs; automations without a schedule remain manual-only.
poetry install
npm install
poetry run cloud-automations validate
gh workflow run dispatch.yml -f automation=hello-world