Skip to content

Warning

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

Publish Ansible role to Galaxy

Actions
Publish Ansible role to Galaxy
1.1.1
StarΒ (32)

Tags

Β (2)

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

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.

Example usage

---
name: GitHub Action

on:
  - push

jobs:
  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:

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/[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:

---
name: GitHub Action

on:
  - push

jobs:
  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

Publish Ansible role to Galaxy is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Publish Ansible role to Galaxy
1.1.1

Tags

Β (2)

Publish Ansible role to Galaxy is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.