Resolve a config file from the local workspace or fetch it from the GitHub Contents API into a runner-local file.
- name: Resolve config
id: config
uses: athackst/ci/actions/resolve-config@main
with:
configuration-path: .github/ci-config.yml
| Name | Description | Default |
|---|---|---|
configuration-path |
Path to the config file in the workspace or repository. | None |
output-path |
(optional) Runner-local file path for the resolved config contents. | $/resolved-config.yml |
repo |
(optional) Repository in owner/repo format used for API fetch. |
$ |
ref |
(optional) Git ref or SHA used for API fetch. | $ |
github-token |
(optional) GitHub token used for API fetch. | $ |
| Name | Description |
|---|---|
source-config-path |
Source location used to resolve the config. |
config-path |
Runner-local file path to the resolved config. |
contents: read is typically sufficient.configuration-path exists locally, that file is used directly.repo and ref.config-path always points to a local file on the runner, even when the source came from the API.source-config-path reports either the local path or a repo@ref:path source string.Resolve config from another repository ref:
- name: Resolve shared config
id: config
uses: athackst/ci/actions/resolve-config@main
with:
configuration-path: .github/ci-config.yml
repo: athackst/ci
ref: main
github-token: $