How to Build a Software Factory on GitHub Actions

As agent harnesses evolve, the idea emerges that useful software factories do not require custom harness alterations, complicated memory management, or a thousand-file repository. In fact, the most effective workflows are often the simplest, boiling down the development cycle to:
Issue -> coding harness -> PR
This article demonstrates how we made a software factory run on GitHub Actions via issue-triggered invocations.
Key takeaways:
- GitHub issues can act as the task interface.[1]
- GitHub Apps serve as a secure way to mint short-lived agent access tokens.[2][3]
- While GitHub is one destination for your factory, similar principles can apply across clouds.
- II Agent Runtime enforces your runtime configuration and will eventually abstract cross-cloud configurations.
What is a software factory?
A Software Factory is a system that automatically accepts software tasks, runs a coding harness against a repository, and returns reviewable code changes.
What does the software factory do?
The software factory contains the configuration for your Codex agent to run on GitHub Actions. It also supplies you with the GitHub App manifest required for secure model-to-GitHub API key provisioning.[2][3]
- Issue
- Coding harness
- PR
How does an issue become an agent run?
The Software Factory listens for GitHub issue events in the hub repository. Opening or approving an Agent task starts a GitHub Actions workflow.[1]
Request
- Issue
- Workflow
Checks
- Authorize
- Admit
Run
- Prepare
- Isolate
- Execute
Deliver
- Verify
- Pull request

What does II Agent Runtime provide?
The software factory imports ii-agent-runtime and uses its built-in methods for deployment, run evidence, and credential isolation.
Try the example
This example includes:
- the hub onboarding flow
- GitHub App setup
- runtime policy
- GitHub Actions workflow
- authorization checks
- budget controls
- PR delivery path
FAQ
Who is allowed to invoke an agent?
The issue author must have at least write permission on the target repository.[4]
How does the agent turn its work into a PR request?
Codex pushes its changes to a dedicated branch, then II Agent Runtime confirms that the branch contains commits ahead of the intended base before opening the pull request with a separate scoped credential.
Can this work outside of GitHub?
This example is GitHub-specific, but II Agent Runtime provides an abstraction over providers and will support alternative clouds while maintaining the same model.
Sources
[1] GitHub Docs — Events that trigger workflows. GitHub Actions supports the
issuesevent, including activity types such asopened,reopened, andlabeled. GitHub Docs[2] GitHub Docs — Authenticating as a GitHub App installation. GitHub App installation access tokens expire after one hour and can be restricted to specific repositories and permissions. GitHub Docs
[3] GitHub Docs — Choosing permissions for a GitHub App. GitHub recommends granting Apps the minimum permissions required, and those permissions determine what the App can access through GitHub APIs and Git. GitHub Docs
[4] GitHub Docs — Access permissions on GitHub. GitHub repository access is controlled through permissions and repository roles, which determine what actions a user can perform. GitHub Docs