File tree Expand file tree Collapse file tree 4 files changed +4
-57
lines changed Expand file tree Collapse file tree 4 files changed +4
-57
lines changed Original file line number Diff line number Diff line change 44
44
Dispatch-Trailer: {"type":"'))
45
45
name: Check we don't have Dispatch-Trailer on a protected branch
46
46
run: |-
47
- echo "github.event.head_commit.message contains Dispatch-Trailer"
48
- echo "github.event.head_commit.message value"
49
- cat <<EOD
50
- ${{ github.event.head_commit.message }}
51
- EOD
52
- echo "containsDispatchTrailer expression"
53
- cat <<EOD
54
- (contains(github.event.head_commit.message, '
55
- Dispatch-Trailer: {"type":"'))
56
- EOD
47
+ echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
57
48
false
58
49
- name : Delete caches
59
50
run : |-
Original file line number Diff line number Diff line change 51
51
Dispatch-Trailer: {"type":"'))
52
52
name: Check we don't have Dispatch-Trailer on a protected branch
53
53
run: |-
54
- echo "github.event.head_commit.message contains Dispatch-Trailer"
55
- echo "github.event.head_commit.message value"
56
- cat <<EOD
57
- ${{ github.event.head_commit.message }}
58
- EOD
59
- echo "containsDispatchTrailer expression"
60
- cat <<EOD
61
- (contains(github.event.head_commit.message, '
62
- Dispatch-Trailer: {"type":"'))
63
- EOD
54
+ echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
64
55
false
65
56
- name : Install Go
66
57
uses : actions/setup-go@v5
Original file line number Diff line number Diff line change 64
64
Dispatch-Trailer: {"type":"'))
65
65
name: Check we don't have Dispatch-Trailer on a protected branch
66
66
run: |-
67
- echo "github.event.head_commit.message contains Dispatch-Trailer"
68
- echo "github.event.head_commit.message value"
69
- cat <<EOD
70
- ${{ github.event.head_commit.message }}
71
- EOD
72
- echo "containsDispatchTrailer expression"
73
- cat <<EOD
74
- (contains(github.event.head_commit.message, '
75
- Dispatch-Trailer: {"type":"'))
76
- EOD
67
+ echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
77
68
false
78
69
- name : Install Go
79
70
uses : actions/setup-go@v5
Original file line number Diff line number Diff line change @@ -91,15 +91,7 @@ checkoutCode: {
91
91
name : " Check we don't have \(dispatchTrailer ) on a protected branch "
92
92
if : " \(isProtectedBranch ) && \(containsDispatchTrailer ) "
93
93
run : """
94
- echo "\(_dispatchTrailerVariable ) contains \(dispatchTrailer )"
95
- echo "\(_dispatchTrailerVariable ) value"
96
- cat <<EOD
97
- ${{ \(_dispatchTrailerVariable ) }}
98
- EOD
99
- echo "containsDispatchTrailer expression"
100
- cat <<EOD
101
- \(containsDispatchTrailer )
102
- EOD
94
+ echo "\(_dispatchTrailerVariable ) contains \(dispatchTrailer ) but we are on a protected branch"
103
95
false
104
96
"""
105
97
},
@@ -297,24 +289,6 @@ repositoryDispatch: json.#step & {
297
289
"""#
298
290
}
299
291
300
- workflowDispatch : json .#step & {
301
- #githubRepositoryPath : * githubRepositoryPath | string
302
- #botGitHubUserTokenSecretsKey : * botGitHubUserTokenSecretsKey | string
303
- #workflowID : string
304
-
305
- // params are defined per https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event
306
- #params : * {
307
- ref : defaultBranch
308
- } | _
309
-
310
- _curlGitHubAPI : curlGitHubAPI & {#tokenSecretsKey : #botGitHubUserTokenSecretsKey , _ }
311
-
312
- name : string
313
- run : #"""
314
- \#(_curlGitHubAPI ) --fail --request POST --data-binary \#(strconv .Quote (encjson .Marshal (#params )) ) https://api.github.com/repos/\#(#githubRepositoryPath )/actions/workflows/\#(#workflowID )/dispatches
315
- """#
316
- }
317
-
318
292
// dispatchTrailer is the trailer that we use to pass information in a commit
319
293
// when triggering workflow events in other GitHub repos.
320
294
//
You can’t perform that action at this time.
0 commit comments