Custom GitHub Apps: deploy a commit of your own repository
On this page (6 sections)
- Running a repository-backed application
- Preparing a build
- Moving one change through a release
- Checking the deployed application
- A release record a colleague can reproduce
- Handing the application to a different site
- Frequently Asked Questions
- Which commit should the build run?
- Who manages repository credentials on my own builder?
Running a repository-backed application
Choose where the build runs before connecting a repository. You can keep an existing build server in your cloud account or enroll a machine at your own site. SAU handles authorized access to an enrolled machine. The host owner controls its build tools, storage and network.
The previous managed build offer used SAU-owned compute. Managed provider builds are Coming soon. Check the catalog for an eligible external offer before planning a purchase.
Preparing a build
Pin the source revision your team intends to deploy. Record the build command, runtime, persistent data location and health check. Keep credentials in the deployment environment and give each application only the permissions it needs.
Moving one change through a release
Start with a change you can recognize in a browser, such as a version string on the application’s status page. Choose a test repository or a test branch, build its commit and publish the resulting artifact to a registry your runtime can reach. Record the artifact digest alongside the commit. If you rebuild the same revision later, an updated base image or package mirror can produce a different artifact. The digest tells the operator exactly what the deployment used.
For a private repository, install your GitHub App on the specific repositories the builder needs. Give the installation access to repository contents for checkout. Check separately whether your release process writes a deployment status or publishes a package. GitHub permits an installation token to request a subset of its granted repositories and permissions. Installation tokens expire after one hour, so a long-running worker should obtain a fresh token for the next job. GitHub installation token documentation
On the builder, read the commit actually checked out before starting the release.
git rev-parse --verify HEAD
Checking the deployed application
Run the health check through the same endpoint the intended users reach. Then exercise an operation that reads or writes application data, such as creating a temporary draft and opening it from a second session. A successful build confirms compilation. This separate check exercises the deployed process, its database connection and the network path users take.
Record which provider account pays for build minutes, registry storage and network transfer. A build server in your own account continues to incur that provider’s charges while it runs. For recovery, keep the previous deployable artifact and document any database migration. Reapplying the old digest is safe only when the stored data remains compatible with that release.
A release record a colleague can reproduce
For a small HTTP application, keep a release record with the values that cross team boundaries. The developer supplies the source revision and describes the behavior that should change. The build job supplies an artifact identifier. The operator records where that artifact runs and what they observed from the user’s side of the endpoint. Give everyone access to the record without granting access to production secrets.
| What to record | Where to read it | How it helps |
|---|---|---|
| Repository and commit | The checkout used by the build | A colleague can review the exact source change |
| Artifact digest | The registry after a successful push | The runtime can pull the same image again |
| Runtime configuration revision | Your configuration store | Operators can identify which settings went with a release |
| Health check and result | The deployed application endpoint | A responder can repeat the same check during an incident |
Consider a build that finishes normally but produces an application that cannot sign in to its database. Compare the deployment’s configuration revision with the last successful release. Check that the runtime identity can read the expected secret and that the database allows connections from the new host. These are runtime checks. Putting the database password into build arguments makes it visible in an unrelated stage and complicates rotation.
If the application uses a migration job, decide who executes it and how concurrent deploys are handled. A release record can say that migration 014 completed at a particular time before the new web process accepted requests. For an application that supports running two versions at once, test the previous release against the new schema in a temporary database. If it no longer works, write down the migration-specific recovery sequence while the change is fresh.
Handing the application to a different site
Move a low-risk test deployment first. Give the destination runtime read access to the registry, recreate its configuration, and point it at a separate test dataset. Run the same health and data checks you used on the original host. Measure how long the image takes to pull at the new site. A large build that starts quickly beside its original registry may have a much longer cold start in another region.
Then assign the permanent responsibilities. Someone needs to rotate the builder identity, install operating system updates and decide when old images can be removed. Someone also needs authority in the provider account to recover a failed host. The same person may own both tasks on a small project. Recording the names and recovery contacts lets the service continue when that person is unavailable.
When you retire a test environment, remove its registry credentials and check for retained disks, snapshots, log destinations and DNS records. Keep the release record and the result of the recovery test. They remain useful whether the next deployment runs in an existing cloud account, at a customer site or through a qualified managed provider offer.
Frequently Asked Questions
Which commit should the build run?
Record the full commit SHA with the release and configure the builder to check out that revision. A later push to the same branch can then proceed without changing the source used for that release.
Who manages repository credentials on my own builder?
Your team manages the credentials on that host. Give the build identity read access to the repositories it needs and store deployment credentials separately. Remove its repository access when you retire the builder.
Explore With AI & Cite This Page
Open a grounded prompt in your AI assistant or copy a clean Markdown, HTML, or APA reference link.
Related Diagnostic Tools & Engineering Guides
Validate protocols and subnets directly in your browser or continue reading related architecture notes.
Free Docker Compose Security Linter & Audit
Free IP Subnet Calculator & CIDR Cheat Sheet
UFW Firewall Rule Generator & Chmod Calculator
Docker Hosting Providers Compared (2026): Dedicated KVM Container Hosts vs. Multi-Tenant PaaS and Linux VPS
Compare Docker on a customer-operated Linux host with a hosted application platform or managed external placement. Check kernel access, build limits, recovery responsibility and the supplier’s price.