https://github.com/levonet/ansible-ci-github-rm-branch
Remove branch from github repository
https://github.com/levonet/ansible-ci-github-rm-branch
Last synced: 4 months ago
JSON representation
Remove branch from github repository
- Host: GitHub
- URL: https://github.com/levonet/ansible-ci-github-rm-branch
- Owner: levonet
- License: mit
- Created: 2018-09-28T11:07:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-06T17:30:37.000Z (over 7 years ago)
- Last Synced: 2025-08-21T00:32:24.544Z (10 months ago)
- Homepage: https://galaxy.ansible.com/levonet/ci_github_rm_branch
- Size: 2.93 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CI: Remove branch from github repository.
This role is useful in CI pipeline after merging Pull Request.
## Role Variables
- `ci_github_api` (default: https://api.github.com)
- `ci_github_username` (required): Github username.
- `ci_github_password` (required): [Github access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/).
- `ci_github_owner` (required): Github owner or organisation name.
- `ci_github_repo` (required): Github project repository name.
- `ci_github_ref` (required): Github ref name.
- `ci_github_ignore_error` (default: yes): Ignore any errors.
## Example Playbook
```yaml
- hosts: 127.0.0.1
connection: local
gather_facts: no
vars:
ci_github_username: ci-bot
ci_github_password: secret
ci_github_owner: myorg
ci_github_repo: myapp
ci_github_ref: "heads/{{ github_branch }}"
roles:
- role: levonet.ci_github_rm_branch
```
And run in Jenkins:
```bash
ansible-playbook myplaybook.yml -e github_branch="${X_GH_BRANCH}"
```
## License
[MIT](https://opensource.org/licenses/MIT)
## Author Information
This role was created by [Pavlo Bashynskyi](https://github.com/levonet)