Skip to content

seth/drone-trigger-gh-actions #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,22 @@ name: on-droneci-complete
clone:
disable: true
steps:
- name: print-build-status
image: alpine
commands:
- echo "DRONE_BUILD_STATUS=$DRONE_BUILD_STATUS"

- name: trigger-github-actions
image: plugins/webhook
settings:
urls:
- https://api.github.com/repos/code-dot-org/test-workflow-dispatch/actions/workflows/on-droneci-complete.yml/dispatches
username: x-access-token
secrets:
- source: on-droneci-complete-github-token
target: webhook_password
content_type: application/json
username: deploy-code-org
password:
from_secret: on-droneci-complete-github-token
template: |
{
"ref": "{{ build.branch }}",
"ref": "${DRONE_SOURCE_BRANCH}",
"inputs": {
"github_sha": "{{ build.commit }}",
"drone_build_status": "{{ build.status }}",
"drone_build_status": "{{ build.status }}"
}
}
debug: true
# depends_on:
# - unit
# - ui
Expand All @@ -37,6 +29,6 @@ trigger:
- pull_request
---
kind: signature
hmac: 52eb4a39f30b611ecc75ad2636322ff338d904ede0f4ae6f09b6d033cbcf6aee
hmac: 7315f7e73ed32564a359ef6256f6c0dcfe7b5c3ca5d3256c2e999888b545ae14

...
4 changes: 2 additions & 2 deletions .github/workflows/on-droneci-complete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
script: |
await github.rest.repos.createCommitStatus({
context: 'CMS Followup',
description: 'blah blah blah',
description: 'this job should succeed',
owner: context.repo.owner,
repo: context.repo.repo,
sha: '${{ inputs.github_sha }}',
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
script: |
await github.rest.repos.createCommitStatus({
context: 'K8S Followup',
description: 'blah blah blah',
description: 'this job should fail',
owner: context.repo.owner,
repo: context.repo.repo,
sha: '${{ inputs.github_sha }}',
Expand Down
1 change: 1 addition & 0 deletions on-branch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is branch seth/drone-trigger-gh-actions.txt and stuff
Loading