Parcourir la source

dispatch on tag creation (#734)

Co-authored-by: registergoofy <70151212+registergoofy@users.noreply.github.com>
Manuel Sabban il y a 4 ans
Parent
commit
e45cb167bd
1 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. 8 2
      .github/workflows/dispatch_create_tag_hub-tests.yaml

+ 8 - 2
.github/workflows/dispatch_create_tag_hub-tests.yaml

@@ -1,4 +1,4 @@
-name: Dispatch when pre-release
+name: Dispatch to hub-tests when creating pre-release
 
 
 on: 
 on: 
   release:
   release:
@@ -9,10 +9,16 @@ jobs:
     name: dispatch to hub-tests
     name: dispatch to hub-tests
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
+      - id: keydb
+        uses: pozetroninc/github-action-get-latest-release@master
+        with:
+          owner: crowdsecurity
+          repo: crowdsec
+          excludes: prerelease, draft
       - name: Repository Dispatch
       - name: Repository Dispatch
         uses: peter-evans/repository-dispatch@v1
         uses: peter-evans/repository-dispatch@v1
         with:
         with:
           token: ${{ secrets.DISPATCH_TOKEN }}
           token: ${{ secrets.DISPATCH_TOKEN }}
           event-type: create_tag
           event-type: create_tag
           repository: crowdsecurity/hub-tests
           repository: crowdsecurity/hub-tests
-          client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
+          client-payload: '{"version": "${{ steps.keydb.outputs.release }}"}'