CodeCharta publish
Source: actions/universal-codecharta-publish/action.yml
Publishes a CodeCharta snapshot (or removes a preview) into the data repo the consumer specifies via data_repo. Clones the data repo, copies the artifacts into projects/<project_name>/..., rebuilds the manifest, and pushes back to the data repo's default branch. Handles concurrent commits via retry-on-conflict.
Usage
- uses: futuredapp/.github/.github/actions/universal-codecharta-publish@2.7.0
with:
mode: '...'
project_name: '...'
data_repo: '...'
data_repo_token: '...'
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
mode |
string |
Yes | — | One of: preview, history, bulk-history, delete-preview, set-latest. preview and delete-preview accept a numeric pr_number. history accepts stem + date + paths. bulk-history accepts snapshots_dir. set-latest takes no extra inputs. |
project_name |
string |
Yes | — | Output folder name in the data repo (projects/<project_name>/). |
data_repo |
string |
Yes | — | <owner>/<name> of the data repository that holds the published snapshots and the manifest. No default — supplied per consumer so this public action doesn't bake in a specific (potentially private) repo. |
data_repo_branch |
string |
No | main |
Branch in the data repo to push to. |
data_repo_token |
string |
Yes | — | Token with write access to the data repo. Use a fine-grained PAT or an app token scoped to Contents: read+write. |
pr_number |
string |
No | — | Pull-request number. Required for preview and delete-preview. |
stem |
string |
No | — | Snapshot stem, either pr-<N> or merge-<short-sha>. Required for history. Not used by bulk-history (which discovers stems from the snapshot filenames in snapshots_dir). |
date |
string |
No | — | Snapshot date as YYYY-MM-DD. Required for history. Not used by bulk-history or set-latest. |
cc_path |
string |
No | — | Absolute path to the local .cc.json.gz to publish. Required for preview and history. Not used by bulk-history (paths come from snapshots_dir). |
cg_path |
string |
No | — | Absolute path to the local .cg.json to publish. Required for preview and history. Bulk-history snapshots don't include .cg.json so this isn't applicable there. |
meta_path |
string |
No | — | Absolute path to the local .meta.json sidecar (PR title/author/etc.). Optional; carried through to the data repo when present. |
snapshots_dir |
string |
No | — | Absolute path to a directory containing historical snapshots named <project>-<YYYY-MM-DD>-(pr-<N>|merge-<sha>).cc.json.gz (with optional .meta.json sidecars). Required for bulk-history. One clone, idempotent copies for entries not yet present, one summary commit, one push. |