From ef3d4610ac3a97f6758998fc2fea86dd9775db7d Mon Sep 17 00:00:00 2001 From: guillermodotn Date: Sun, 12 May 2024 20:32:21 +0200 Subject: [PATCH] Creating a release workflow for publishing on Galaxy. --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c2009ac --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +--- +name: Ansible Galaxy Import +'on': + push: + tags: + - '^v*' + +jobs: + release: + name: 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.ANSIBLE_GALAXY_TOKEN }} + $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) \ No newline at end of file