Skip to content

Commit

Permalink
Merge pull request #5 from adfinis/feat/ansible-galaxy-role-release
Browse files Browse the repository at this point in the history
feat: workflow ansible-galaxy-role-release
  • Loading branch information
adf-patrickha authored Dec 12, 2024
2 parents 73ef374 + 94f3b99 commit 842156e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ansible-galaxy-role-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

name: Release Ansible role to Ansible Galaxy

on:
workflow_call:
secrets:
galaxy_api_key:
required: true

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase
uses: actions/checkout@v4

- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Ansible
run: pip3 install ansible-core

- name: Trigger a new import on Galaxy
run: >-
ansible-galaxy role import
--api-key ${{ secrets.galaxy_api_key }}
--branch ${{ github.event.repository.default_branch }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

0 comments on commit 842156e

Please sign in to comment.