diff --git a/.github/workflow/main.yml b/.github/workflow/main.yml new file mode 100644 index 0000000..0d38ef6 --- /dev/null +++ b/.github/workflow/main.yml @@ -0,0 +1,31 @@ +name: Release +'on': + 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) \ No newline at end of file