/** * Forgejo `uses:` action-reference resolver. * * GitHub Actions resolves a bare `uses: actions/checkout@v4` against the GitHub * Marketplace. Forgejo / Codeberg / Gitea runners have no Marketplace, so such a * ref must be rewritten to a form their runner can fetch — a full repository URL, * or a path under a configured actions root that mirrors the action. * * The resolver rewrites a built-in set of common actions and reports anything it * can't place as a diagnostic (never dropping or silently passing it through). */ /** * Default actions root. `code.forgejo.org` hosts the Forgejo `actions/*` mirror * (checkout, setup-*, cache, upload/download-artifact, …). Override per project * via `forgejo.actionsRoot` in `chant.config.ts`. */ export declare const DEFAULT_ACTIONS_ROOT = "https://code.forgejo.org"; /** * Where a known action resolves: * - `mirror`: `/` — follows the configured actions root. * - `url`: an absolute base URL — independent of the actions root (used for * actions not carried by the Forgejo mirror, e.g. `docker/*`). */ export type ActionTarget = { kind: "mirror"; repo: string; /** * The newest major version that runs on a Forgejo runner, when an older * one is needed: a ref asking for a later major is rewritten to this one. */ newest?: string; } | { kind: "url"; url: string; }; /** * `upload-artifact` and `download-artifact` v4 and later use `@actions/artifact` * v2, which refuses to run on GitHub Enterprise Server, and a Forgejo runner * presents itself to an action as one: the step fails with "@actions/artifact * v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently * supported on GHES" (#4008). v3 talks to the artifact service Forgejo serves. */ export declare const FORGEJO_ARTIFACT_VERSION = "v3"; /** Built-in mapping of GitHub action `owner/repo` → Forgejo-resolvable target. */ export declare const KNOWN_ACTIONS: Record; export interface ActionResolveOptions { /** Base for `mirror` targets; defaults to {@link DEFAULT_ACTIONS_ROOT}. */ actionsRoot?: string; /** Mapping table to use; defaults to {@link KNOWN_ACTIONS}. */ known?: Record; } export interface ActionResolveResult { /** The rewritten (or unchanged) `uses:` ref. */ rewritten: string; /** Set when the ref could not be resolved — surfaced as a build warning. */ warning?: string; } /** * Resolve a single `uses:` action ref to a Forgejo-resolvable form. */ export declare function resolveActionRef(ref: string, options?: ActionResolveOptions): ActionResolveResult; //# sourceMappingURL=actions.d.ts.map