ansible-community/Build an Ansible collection
This action builds an Ansible collection. The resulting artifact (tarball) can be used in other steps or uploaded as a GitHub artifact.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 22, 2026
- License
- GPL 3.0
Pinned Snippet
uses: ansible-community/github-action-build-collection@0114c6cc7d519ac693d4f385750e1706321f6d56 # no releases — HEAD as of 2026-07-13tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| python-version | The Python version to use for running ansible-core. | — | 3.13 |
| ansible-core-version | The branch of tag name of ansible-core to install. This is assumed to exist in https://github.com/ansible/ansible. | — | stable-2.18 |
| subdirectory | The subdirectory in which the collection's sources can be found. Must contain the `galaxy.yml` file. | — | . |
| collection-requirements-path | If provided, the collection's requirements will be written as a Galaxy `requirements.yml` file to this path. | — | — |
Outputs
| name | description |
|---|---|
| collection-full-name | The collection's full name (namespace.name). |
| collection-name | The collection's name. For example `ansible.posix`'s name is `posix`. |
| collection-namespace | The collection's namespace. For example `ansible.posix`'s namespace is `ansible`. |
| collection-version | The collection's version. Will be set to `0.0.1` if no `version` field is present in `galaxy.yml`. |
| artifact-filename | Filename of the built collection artifact. |
| artifact-path | Path to the built collection artifact. |