IMPORTANT: Developer documentation for the current development branch. This content is unreleased, may change without notice, and must not be treated as Buildish release documentation.
Codeberg
Forgejo Actions is API-compatible with GitHub Actions for most surface areas this action relies on,
including the @actions/cache toolkit and artifact APIs. Codeberg.org runs Forgejo, so support for
both platforms is expected to arrive together.
What needs to be built
BaseCacheBackend (src/cache/backend.ts)
Forgejo Actions exposes a cache service compatible with the GitHub Actions cache protocol.
The @actions/cache package is expected to work as-is, or with minor version pinning adjustments.
The BaseCacheBackendCapabilities for this provider would initially mirror GitHub’s:
1{
2 supportsCacheRestore: true,
3 supportsCacheSave: true,
4}
WorkflowArtifactBackend (src/delta/backend.ts)
Forgejo’s artifact API surface differs from GitHub’s in a few areas:
- The artifact upload/download API is compatible at the REST level but uses different SDK paths.
- Run-scoped artifact listing and cross-run artifact access may require direct REST calls rather
than the
@actions/artifactv2 package.
The WorkflowArtifactBackendCapabilities would report what operations are confirmed working once
the integration is tested.
Host adapters (src/host/types.ts)
@actions/core is available on Forgejo Actions and provides saveState, getState, getInput,
setOutput, summary, and log-group APIs. The GitHub host adapters in src/ci/github/host.ts
should be reusable with minor changes or extracted into a shared @actions/core-based adapter.
CiPlatformAdapter (src/ci/types.ts)
Forgejo exposes GitHub-compatible environment variables (GITHUB_JOB, GITHUB_RUN_ID,
GITHUB_RUN_ATTEMPT, GITHUB_SERVER_URL, etc.). The GitHub provider implementation should be
largely reusable.
Finalize (post) phase
Forgejo Actions supports a post-execution hook via post: in action.yml, matching GitHub’s
model exactly. The same two-entrypoint approach used for GitHub Actions should work without changes
to the phase logic.
Key uncertainties
- Artifact cross-run access: does Forgejo support fetching artifacts from a different run within the same workflow? This is required for the distributed worker/aggregator model.
- API rate limits and authentication token scopes for artifact and cache operations.
- Whether
FORGEJO_SERVER_URLorGITEA_SERVER_URLshould be preferred overGITHUB_SERVER_URL.
Recommended approach
- Start with a thin adapter in
src/ci/forgejo/that delegates to@actions/coreand@actions/cachewherever those packages work on Forgejo. - Replace only the parts that differ (artifact backend, server URL detection).
- Add integration tests against a self-hosted Forgejo instance.