Ansible Collection: Release¶
Builds and optionally publishes an Ansible collection to Galaxy.
Usage¶
Create the main .github/workflows/release.yaml file for an Ansible collection repo:
.github/workflows/release.yaml
name: Release
on:
release:
types:
- published
permissions: {} # (1)
jobs:
release-ansible-collection:
permissions:
contents: read # (2)
uses: radiorabe/actions/.github/workflows/release-ansible-collection.yaml@v0.0.0
with:
publish: true # (3)
secrets:
GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }} # (4)
- Deny all permissions at the workflow level as a secure baseline.
- Grant only the minimum permissions this workflow requires.
- Set
publishtofalseto skip publishing the collection to Galaxy (defaults totrue). - The
GALAXY_API_KEYis shared across our repos and can be enabled for your repo by a GitHub organisation admin.
The collections we publish with this can be found on our Galaxy page.
Inputs¶
| Input | Description | Required | Default |
|---|---|---|---|
publish |
Enable publishing collection to Galaxy | No | true |
Secrets¶
| Secret | Description | Required |
|---|---|---|
GALAXY_API_KEY |
Ansible Galaxy API key | Yes |