]> git.immae.eu Git - github/fretlink/ansible-rundeck-jobs.git/commitdiff
publish to ansible galaxy on release 13/head
authorGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Fri, 19 Nov 2021 15:53:27 +0000 (16:53 +0100)
committerGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Fri, 19 Nov 2021 16:00:53 +0000 (17:00 +0100)
.github/workflows/pr.yml

index 3daa0e2afbcf52cc74d9b200432f5dfb7b387bc5..1be06b75573b022d4f3960fe48b7804eac402fd4 100644 (file)
@@ -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 }}'