---
myst:
  html_meta:
    "description": "The GitHub Actions step outputs of repoplone settings github-outputs and repoplone changelog check --github, and the JSON report of changelog check --json."
    "property=og:description": "The GitHub Actions step outputs of repoplone settings github-outputs and repoplone changelog check --github, and the JSON report of changelog check --json."
    "property=og:title": "GitHub Actions outputs"
    "keywords": "Plone, repoplone, GitHub Actions, outputs, JSON, paths-filter"
---

(reference-github-outputs)=

# GitHub Actions outputs

Two commands print step outputs in the format of `$GITHUB_OUTPUT`: `repoplone settings github-outputs` and `repoplone changelog check --github`.
Each output is a `name=value` line.
A multi-line output uses the `name<<DELIMITER` form, ended by a line holding only the delimiter.
JSON values are compact, on one line.

(reference-github-outputs-settings)=

## `settings github-outputs`

<!-- source: src/repoplone/utils/settings.py, github_outputs -->

The outputs come in this order.

| Output | Format | Value |
|---|---|---|
| `components` | JSON list | One object per component. See {ref}`reference-github-outputs-component`. |
| `packages` | JSON list | One object per enabled package. See {ref}`reference-github-outputs-package`. |
| `image-name-prefix` | text | `[repository] container_images_prefix`, or empty. |
| `<component>-version` | text | The version of the component's base package. One line per component. |
| `<component>-volto-version` | text | The Volto core version of a `node-volto` component. Only for `node-volto` components. |
| `paths-filter` | multi-line, delimiter `REPOPLONE_PATHS_FILTER` | A `dorny/paths-filter` filter: one key per component, listing its watch paths. |

A repository without `[[component]]` tables reports its implicit `backend` and `frontend` components.

(reference-github-outputs-component)=

### Component object

| Key | Type | Value |
|---|---|---|
| `name` | string | Component name. |
| `type` | string | Component type, such as `node-volto`. |
| `path` | string | Folder of the component, relative to the repository root. `.` for the root. |
| `base_package` | string | Base package, or empty. |
| `base_package_version` | string | Version of the base package the component pins, or empty. |
| `volto_version` | string | Volto core version of a `node-volto` component, or empty. |
| `image_name` | string | `<image-name-prefix>-<name>`, or empty without a prefix. |
| `packages` | list of strings | Names of the packages that list the component. |
| `watch_paths` | list of strings | Glob patterns of the folders whose changes affect the component: its own folder, then the folders of its packages that are outside it. `**` for a component at the root. |

(reference-github-outputs-package)=

### Package object

| Key | Type | Value |
|---|---|---|
| `name` | string | Package name. |
| `type` | string | Package type, such as `python-plone`. |
| `family` | string | `python` or `node`. |
| `path` | string | Folder of the package, relative to the repository root. |
| `version` | string | Current version of the package. |
| `publish` | boolean | Whether the release publishes the package. |
| `changelog` | string | Changelog file, relative to the repository root. |
| `towncrier` | string | towncrier configuration file, relative to the repository root. |
| `components` | list of strings | Names of the components the package belongs to. |

(reference-github-outputs-changelog-check)=

## `changelog check --github`

<!-- source: src/repoplone/commands/changelog.py, _github_outputs -->

| Output | Format | Value |
|---|---|---|
| `missing` | JSON list of strings | Names of the areas that require a news fragment and have none. `[]` when none is missing. |
| `areas` | JSON list | One object per area, with `name`, `path`, `news_folder`, `requires`, `has`, and `missing`. |
| `summary` | multi-line, delimiter `REPOPLONE_NEWS_SUMMARY` | A Markdown table of the areas, for `$GITHUB_STEP_SUMMARY`. |

The command exits with `1` when `missing` is not empty, after printing the outputs.

(reference-github-outputs-changelog-report)=

## `changelog check --json`

<!-- source: src/repoplone/utils/news.py, report_to_dict -->

`--json` prints one JSON object.

| Key | Type | Value |
|---|---|---|
| `base` | string | The branch compared with, as given to `--compare-with`. |
| `areas` | list | One object per area. See below. |
| `missing` | list of strings | Names of the areas that require a fragment and have none. |
| `unmatched` | list of strings | Changed files that no area holds, relative to the repository root. |

Each area object has these keys.

| Key | Type | Value |
|---|---|---|
| `name` | string | Package name, or `repository`. |
| `path` | string | Folder the area owns, relative to the repository root. |
| `news_folder` | string | Folder of the area's news fragments. |
| `requires` | boolean | Whether a file of the area changed. |
| `has` | boolean | Whether the change adds a news fragment to the area. |
| `missing` | boolean | `requires` and not `has`. |
| `changes` | list of strings | Changed files of the area. Only in `--json`. |
| `fragments` | list of strings | News fragments the change adds. Only in `--json`. |

```{seealso}
- {doc}`/how-to/use-in-github-actions`, for a workflow built on these outputs.
- {doc}`/how-to/check-news-in-ci`, for the news fragment check.
```
