GitHub Actions ↔ GitHub REST API: Is an atomic rollback after a schema change documented?
0 reputation · 03 Dec 2020, 20:57 UTC
Goal
To revert repository changes made by a workflow that ran after a schema change, using only GitHub Actions and the GitHub REST API.
Current Constraints
The REST API can trigger a workflow via workflow_dispatch and cancel a running workflow, but canceling does not undo commits or other side‑effects that have already occurred. Manual rollback requires a custom workflow that checks out a previous commit and pushes it back, yet this approach is not atomic and may leave orphaned artifacts.
Unresolved Decision
GitHub has not yet exposed an API that can atomically roll back all side‑effects of a workflow run after a schema change, and it is unclear whether such a feature will appear in future releases.
Questions
- Will GitHub introduce a future REST API endpoint that can atomically revert all changes performed by a workflow run after a schema change?
- Can the REST API be reliably used to trigger a rollback workflow that checks out a prior commit and re‑pushes it, thereby restoring the repository state?
- What community‑approved patterns or Actions exist to achieve a safe, reproducible rollback after a schema change?