github_release - Interact with GitHub Releases¶
New in version 2.2.
Synopsis¶
- Fetch metadata about GitHub Releases
Requirements¶
The below requirements are needed on the host that executes this module.
- github3.py >= 1.0.0a3
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
action
required |
|
Action to perform
|
body
(added in 2.4) |
Description of the release when creating a release
|
|
draft
bool (added in 2.4) |
|
Sets if the release is a draft or not. (boolean)
|
name
(added in 2.4) |
Name of release when creating a release
|
|
password
(added in 2.4) |
The GitHub account password for the user
|
|
prerelease
bool (added in 2.4) |
|
Sets if the release is a prerelease or not. (boolean)
|
repo
required |
Repository name
|
|
tag
(added in 2.4) |
Tag name when creating a release. Required when using action is set to
create_release . |
|
target
(added in 2.4) |
Target of release when creating a release
|
|
token |
GitHub Personal Access Token for authenticating
|
|
user
required |
The GitHub account that owns the repository
|
Examples¶
- name: Get latest release of testuseer/testrepo
github_release:
token: tokenabc1234567890
user: testuser
repo: testrepo
action: latest_release
- name: Get latest release of test repo using username and password. Ansible 2.4.
github_release:
user: testuser
password: secret123
repo: testrepo
action: latest_release
- name: Create a new release
github_release:
token: tokenabc1234567890
user: testuser
repo: testrepo
action: create_release
tag: test
target: master
name: My Release
body: Some description
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
create_release
string
|
success |
Version of the created release
For Ansible version 2.5 and later, if specified release version already exists, then State is unchanged
For Ansible versions prior to 2.5, if specified release version already exists, then State is skipped
Sample:
1.1.0
|
latest_release
string
|
success |
Version of the latest release
Sample:
1.1.0
|
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance¶
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author¶
- Adrian Moisey (@adrianmoisey)
Hint
If you notice any issues in this documentation you can edit this document to improve it.