Applications / User guide
Source builds
Connect source repositories and build application revisions into deployable container images.
On this page
Before you begin
Connect the supported source integration, grant access to the intended repository, and prepare build configuration plus a target cluster and registry.
Get started
- Connect the repository through the source integration.
- Choose a branch or exact revision and configure the build context.
- Push a commit to the bound branch to trigger the configured workflow, then inspect the build run until an image digest is produced.
- Deploy the resulting artifact and verify the running application matches the intended revision.
Configure the GitHub workflow
Bind the exact repository, branch, workflow filename, and OCI artifact repository. The GitHub App needs Contents read permission, Actions write permission, and the push and workflow_run webhook subscriptions.
The configured workflow must accept workflow_dispatch inputs named anchras_run_id, anchras_commit_sha, and anchras_artifact_repository. Set its run name to correlate the result to the exact Anchras run:
run-name: anchras-${{ inputs.anchras_run_id }}After building and publishing the exact commit, upload one GitHub Actions artifact named anchras-build-result containing one file named anchras-result.json:
{"image_digest_ref":"ghcr.io/your-org/your-app@sha256:<64-lowercase-hex>"}Use the actual immutable digest from your image push. Its repository must exactly match the binding. Missing results, tags in place of digests, and mismatched repositories are rejected. A successful source build records a deployable artifact; deployment reconciliation still needs to complete.
Operate the service
Use immutable image digests to identify released artifacts. Review failed build steps before retrying, and keep build secrets in supported secret bindings. Clean up obsolete deployments and images according to retention needs.
Availability and limits
A source connection grants only the repositories approved in the integration. Build execution, registry publication, and public application exposure require configured runtimes and credentials.
Troubleshooting
For missing repositories, check installation permissions. For build failures, inspect dependency downloads, build context, and secret availability. A successful build does not prove the application is healthy after deployment.
Next steps
Use the CLI guide to automate repeatable work, or the API guide to integrate Anchras with your own tools.
CLI commands
Install and authenticate using the CLI guide. The table describes command families; required arguments are shown in their usage output.
| Command | Purpose |
|---|---|
source connections list | Show provider, account, origin, authorization status, transport and reach-via instance. |
source connections connect --provider github\|gitlab | Print the authorization URL. Open it as the same Anchras user and organization; the dashboard normally completes the return. With GitLab and the operator's org_network transport, --reach-via-instance <instance-id> routes the authorization and every later request through that instance's host agent, for a GitLab on a private address the organization cannot prove it owns (ADA-1819). Reconnecting sets, changes or clears the route (without the flag, it dials directly); the change is audited. |
source connections complete --provider gitlab --callback-file PATH | Complete an uncaptured OAuth callback from a private file containing its HTTPS URL; avoids putting the authorization code in shell history. A consumed callback cannot be reused. |
source connections refresh --connection ID | Refresh and verify GitLab authorization. |
source connections disconnect --connection ID | Disconnect; GitLab removes hooks and revokes its grant, retaining failed cleanup for retry. GitHub App uninstall remains a separate GitHub action. |
source repositories discover --connection ID | Discover accessible repositories, including nested GitLab namespaces. |
source repositories branches --connection ID --repository group/project | List GitLab branches and commit IDs. |
source repositories bind --connection ID --repository group/project --branch main --artifact-repository registry.example/group/image | Enable builds using the provider's default workflow; add --deployment ID to queue verified images for an existing instance deployment. |
source repositories list | List saved build bindings with provider labels. |
source repositories unbind BINDING_ID | Disable and remove a build binding. |
source builds list / source builds get RUN_ID | Inspect build state, errors and immutable artifact identity. |
API reference
Browse procedures, request and response types, and download the complete OpenAPI contract.
