Skip to content

Release-galaxy

Release-galaxy #3

---
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
# repository or organization.
#
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
# See: https://github.com/ansible/galaxy/issues/46
name: Release-galaxy
'on':
workflow_dispatch:
workflow_run:
workflows:
- Release-github
types:
- completed
branches:
- master
defaults:
run:
working-directory: 'bulch.rsync_server'
jobs:
release-ansible-galaxy:
name: Release ansible-galaxy
runs-on: ubuntu-24.04
steps:
- name: Check out the codebase.
uses: actions/[email protected]
with:
path: 'bulch.rsync_server'
- name: Set up Python 3.
uses: actions/[email protected]
with:
python-version: '3.x'
- name: Install Ansible
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install required collections
run: |
ansible-galaxy collection install -r requirements.yml
ansible-galaxy collection install -r molecule/default/requirements.yml
- name: List installed collections
run: ansible-galaxy collection list
- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)