X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=.github%2Fworkflows%2Fpr.yml;h=1be06b75573b022d4f3960fe48b7804eac402fd4;hb=a50affb4dd690b545df3f9cd935a4f6861a4dfa9;hp=3daa0e2afbcf52cc74d9b200432f5dfb7b387bc5;hpb=d11535de777b5472de560d823edafe2373e702ae;p=github%2Ffretlink%2Fansible-rundeck-jobs.git 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 }}'