34 lines
783 B
YAML
34 lines
783 B
YAML
---
|
|
name: Release
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
env:
|
|
GALAXY_USERNAME: IronicBadger
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Set up Python 3.
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install Ansible.
|
|
run: pip3 install ansible-core
|
|
|
|
# Galaxy uses CamelCase username but GitHub is all lowercase
|
|
# This concatenates the versions together to work with
|
|
# And triggers an import on Galaxy
|
|
- name: Trigger a new import on Galaxy.
|
|
run: >-
|
|
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
|
|
$(echo ${{ env.GALAXY_USERNAME }})
|
|
$(echo ${{ github.repository }} | cut -d/ -f2)
|