crowdsec/.github/workflows/dispatch_create_branch_hub.yaml

35 lines
872 B
YAML

name: Dispatch to hub when creating pre-release
on:
release:
types:
- prereleased
jobs:
get_latest_release:
name: get_latest_release
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- id: get_latest_release
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada
env:
GITHUB_TOKEN: ${{ github.token }}
with:
latest: true
draft: false
prerelease: false
dispatch:
name: dispatch to hub-tests
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DISPATCH_TOKEN }}
event-type: create_branch
repository: crowdsecurity/hub
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'