Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

Publish Ansible role to Galaxy

1.0.3

Publish Ansible role to Galaxy

play

Publish Ansible role to Galaxy

Publish Ansible role to Galaxy

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Publish Ansible role to Galaxy

uses: robertdebock/galaxy-action@1.0.3

Learn more about this action in robertdebock/galaxy-action

Choose a version

Galaxy action

A GitHub action to publish your Ansible role to Galaxy.

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

Example usage

---
name: GitHub Action

on:
  - push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2
      - name: galaxy
        uses: robertdebock/galaxy-action@1.0.3
        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:

name: GitHub Action

on:
  - push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2
        with:
          path: "${{ github.repository }}"
      - name: molecule
        uses: robertdebock/molecule-action@1.2.4
  release:
    needs:
      - test
    runs-on: ubuntu-latest
    steps:
      - name: galaxy
        uses: robertdebock/galaxy-action@1.0.3
        with:
          galaxy_api_key: ${{ secrets.galaxy_api_key }}