add new workflows to create/delete branch on hub (#193)
This commit is contained in:
parent
b2ef6a555c
commit
2db6882202
24
.github/workflows/dispatch_create_branch_hub.yaml
vendored
Normal file
24
.github/workflows/dispatch_create_branch_hub.yaml
vendored
Normal 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 }}"}'
|
24
.github/workflows/dispatch_delete_branch_hub.yaml
vendored
Normal file
24
.github/workflows/dispatch_delete_branch_hub.yaml
vendored
Normal 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 }}"}'
|
Loading…
Reference in a new issue