Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robertdebock/galaxy-action
Publish Ansible roles to Galaxy
https://github.com/robertdebock/galaxy-action
Last synced: 6 days ago
JSON representation
Publish Ansible roles to Galaxy
- Host: GitHub
- URL: https://github.com/robertdebock/galaxy-action
- Owner: robertdebock
- Created: 2019-12-21T05:24:38.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-24T10:35:16.000Z (over 2 years ago)
- Last Synced: 2024-10-01T10:33:55.549Z (about 1 month ago)
- Size: 14.6 KB
- Stars: 32
- Watchers: 4
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actions - Deploy an Ansible role to Ansible Galaxy
- fucking-awesome-actions - Deploy an Ansible role to Ansible Galaxy
- awesome-workflows - Deploy an Ansible role to Ansible Galaxy
README
# Galaxy action
A GitHub action to publish your [Ansible](https://www.ansible.com/) role to [Galaxy](https://galaxy.ansible.com/).
## Requirements
This action expects the following (default Ansible role) structure:
```
.
├── defaults
│ └── main.yml
├── handlers
│ └── main.yml
├── meta
│ └── main.yml
├── requirements.yml
├── tasks
│ └── main.yml
└── vars
└── main.yml
```## Inputs
### `galaxy_api_key`
The API Key for your personal Galaxy account. Found under https://galaxy.ansible.com/me/preferences . You can store this key in GitHub's Settings -> Secrets -> New repository secret. (Name: galaxy_api_key, Value: The token you copied from Galaxy.)
### `path`
For repositories that have multiple roles, you can specify a (relative) path to go into before releasing the role. Defaults to `./`. An example value could be `my_role`.
### `git_branch`
You may specify a specific branch to push. The default is `master`.
## Example usage
```yaml
---
name: GitHub Actionon:
- pushjobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: galaxy
uses: robertdebock/[email protected]
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
```Here is a another example that uses molecule to test the role and this Galaxy action to release:
```yaml
name: GitHub Actionon:
- pushjobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/[email protected]
release:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: galaxy
uses: robertdebock/[email protected]
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
```When you have multiple roles in your repository, you can release one specific role by specifying a `path`:
```yaml
---
name: GitHub Actionon:
- pushjobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: galaxy
uses: robertdebock/[email protected]
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
path: my_role
git_branch: my_branch
```