add new workflows to create/delete branch on hub (#193)

This commit is contained in:
AlteredCoder 2020-08-28 15:24:10 +02:00 committed by GitHub
parent b2ef6a555c
commit 2db6882202
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,24 @@
name: Dispatch to hub when creating pre-release
on:
release:
types: prereleased
jobs:
dispatch:
name: dispatch to hub-tests
runs-on: ubuntu-latest
steps:
- name: Get Latest Release
id: latest_version
uses: abatilo/release-info-action@v1.2.0
with:
owner: crowdsecurity
repo: crowdsec
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DISPATCH_TOKEN }}
event-type: create_branch
repository: crowdsecurity/hub
client-payload: '{"version": "${{ steps.latest_version.outputs.latest_tag }}"}'

View file

@ -0,0 +1,24 @@
name: Dispatch to hub when deleting pre-release
on:
release:
types: deleted
jobs:
dispatch:
name: dispatch to hub-tests
runs-on: ubuntu-latest
steps:
- name: Get Latest Release
id: latest_version
uses: abatilo/release-info-action@v1.2.0
with:
owner: crowdsecurity
repo: crowdsec
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DISPATCH_TOKEN }}
event-type: delete_branch
repository: crowdsecurity/hub
client-payload: '{"version": "${{ steps.latest_version.outputs.latest_tag }}"}'