Skip to content

Commit a26d2c8

Browse files
authored
flesh out on-droneci-complete.yml
1 parent 037c0e2 commit a26d2c8

File tree

2 files changed

+59
-17
lines changed

2 files changed

+59
-17
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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 did they fail?"
11+
required: true
12+
type: boolean
13+
14+
jobs:
15+
on-droneci-complete:
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- run: |
19+
echo "Triggered by Drone commit: ${{ inputs.github_sha }}"
20+
21+
k8s-followup-thing:
22+
runs-on: ubuntu-24.04
23+
needs: on-droneci-complete
24+
steps:
25+
# probably a uses: invocation IRL
26+
- name: invoke workflow
27+
run: |
28+
echo "This step should fail"
29+
false
30+
31+
- uses: actions/github-script@v7
32+
with:
33+
script: |
34+
await github.rest.repos.createCommitStatus({
35+
context: 'K8S Followup Thing',
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
sha: '${{ inputs.github_sha }}',
39+
state: '${{ job.status == 'success' && "success" || "failure" }}',
40+
})
41+
42+
cms-followup-thing:
43+
runs-on: ubuntu-24.04
44+
needs: on-droneci-complete
45+
steps:
46+
- run: |
47+
echo "This step should succeed"
48+
true
49+
50+
- uses: actions/github-script@v7
51+
with:
52+
script: |
53+
await github.rest.repos.createCommitStatus({
54+
context: 'CMS Followup Thing',
55+
owner: context.repo.owner,
56+
repo: context.repo.repo,
57+
sha: '${{ inputs.github_sha }}',
58+
state: '${{ job.status == 'success' && "success" || "failure" }}',
59+
})

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

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

0 commit comments

Comments
 (0)