diff --git a/.drone.yml b/.drone.yml index 0f2c1bb..19c7d19 100644 --- a/.drone.yml +++ b/.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 - \ No newline at end of file + +--- +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 \ No newline at end of file