fix: fix name of pull_request target #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
env: | |
GALAXY_USERNAME: micxer | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python 3. | |
uses: actions/setup-python@v5 | |
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: | | |
REPO="$(echo ${{ github.repository }} | cut -d/ -f2)" | |
ROLE_NAME="$(echo "${REPO#ansible-role-}" | tr '-' '_')" | |
ansible-galaxy role import --token ${{ secrets.GALAXY_API_KEY }} \ | |
--branch master --role-name $ROLE_NAME \ | |
${{ env.GALAXY_USERNAME }} $REPO |