Skip to content

Commit

Permalink
feat: workflow ansible-galaxy-role-release
Browse files Browse the repository at this point in the history
  • Loading branch information
adf-patrickha committed Dec 12, 2024
1 parent 73ef374 commit 94f3b99
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 94f3b99

Please sign in to comment.