From ab34f62e7db0d4f0a6e7ebb86c256c42345688e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Fri, 19 Nov 2021 16:53:27 +0100 Subject: publish to ansible galaxy on release --- .github/workflows/pr.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3daa0e2..1be06b7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,6 +6,8 @@ on: pull_request: branches: - master + release: + types: [created, edited, published] jobs: tests: runs-on: ubuntu-latest @@ -33,3 +35,14 @@ jobs: - run: http --ignore-stdin localhost:4440/api/26/projects name=test X-Rundeck-Auth-Token:testtoken Accept:application/json - run: | cd ${{ github.repository }}/tests && ansible-playbook -i inventory test.yml + publish: + runs-on: ubuntu-latest + needs: tests + if: ${{ github.event_name == 'release' }} + steps: + - uses: actions/checkout@v2 + - name: Upload to ansible-galaxy + uses: artis3n/ansible_galaxy_collection@v2 + with: + api_key: '${{ secrets.GALAXY_API_KEY }}' + galaxy_version: '${{ github.event.release.tag_name }}' -- cgit v1.2.3