Skip to content

Commit e4bb966

Browse files
committed
Merge branch 'main' into seth/drone-trigger-gh-actions
2 parents 9d80a4d + c6ac7f1 commit e4bb966

File tree

2 files changed

+57
-17
lines changed

2 files changed

+57
-17
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: on-droneci-complete
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
github_sha:
7+
description: "equivalent to github.sha in an ordinary workflow"
8+
required: true
9+
success:
10+
description: "did drone tests pass or fail?"
11+
required: true
12+
type: boolean
13+
14+
jobs:
15+
# This one should pass
16+
cms-followup:
17+
runs-on: ubuntu-24.04
18+
# uses: ./.github/workflows/cms-followup.yml
19+
steps:
20+
- run: |
21+
echo "Triggered by Drone commit: ${{ inputs.github_sha }} on branch ${{ github.ref }}"
22+
echo "This step should succeed"
23+
true
24+
25+
# Need to do this manually or the result won't be visible within the PR
26+
- uses: actions/github-script@v7
27+
with:
28+
script: |
29+
await github.rest.repos.createCommitStatus({
30+
context: 'CMS Followup',
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
sha: '${{ inputs.github_sha }}',
34+
state: '${{ job.status == 'success' && "success" || "failure" }}',
35+
})
36+
37+
# This one should fail
38+
k8s-followup:
39+
runs-on: ubuntu-24.04
40+
# uses: ./.github/workflows/k8s-followup.yml
41+
steps:
42+
- run: |
43+
echo "Triggered by Drone commit: ${{ inputs.github_sha }} on branch ${{ github.ref }}"
44+
echo "This step should fail"
45+
false
46+
47+
# Need to do this manually or the result won't be visible within the PR
48+
- uses: actions/github-script@v7
49+
with:
50+
script: |
51+
await github.rest.repos.createCommitStatus({
52+
context: 'K8S Followup',
53+
owner: context.repo.owner,
54+
repo: context.repo.repo,
55+
sha: '${{ inputs.github_sha }}',
56+
state: '${{ job.status == 'success' && "success" || "failure" }}',
57+
})

.github/workflows/on-droneci-success.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)