This commit is contained in:
parent
d85a87a521
commit
6422ba4619
1 changed files with 23 additions and 6 deletions
29
.drone.yml
29
.drone.yml
|
@ -4,12 +4,13 @@ type: docker
|
|||
name: start-github-action
|
||||
steps:
|
||||
- name: create workflow_dispatch event
|
||||
image: alpine/curl
|
||||
commands:
|
||||
- "curl -X POST -H \"Accept: application/vnd.github+json\" -H \"Authorization: token $GITHUB_TOKEN\" https://api.github.com/repos/dorianim/drone-runner/actions/workflows/drone.yml/dispatches -d '{\"ref\":\"main\",\"inputs\":{}}'"
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
image: itsblue.dev/plugins/github-workflow-controller
|
||||
settings:
|
||||
github_token:
|
||||
from_secret: github-token
|
||||
github_repo: "dorianim/drone-runner"
|
||||
workflow_id: "drone.yml"
|
||||
workflow_actions: start
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
|
@ -27,4 +28,20 @@ steps:
|
|||
|
||||
depends_on:
|
||||
- start-github-action
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: stop-github-action
|
||||
steps:
|
||||
- name: create workflow_dispatch event
|
||||
image: itsblue.dev/plugins/github-workflow-controller
|
||||
settings:
|
||||
github_token:
|
||||
from_secret: github-token
|
||||
github_repo: "dorianim/drone-runner"
|
||||
workflow_id: "drone.yml"
|
||||
workflow_actions: stop,delete
|
||||
|
||||
depends_on:
|
||||
- macos
|
Loading…
Reference in a new issue