Skip to content

Commit a4a38ed

Browse files
committed
ci: tidy up encoding of JSON args to curl
Rather than hand-crafting JSON arguments to curl, use encoding/json.Marshal and then strconv.Quote the result (which is the right escaping for bash). Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I75a098c8c86391e1b2df337e02f1f601f0cdfca6 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/520792 Unity-Result: CUEcueckoo <cueckoo@cuelang.org> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
1 parent 7d25ee2 commit a4a38ed

File tree

5 files changed

+155
-29
lines changed

5 files changed

+155
-29
lines changed

.github/workflows/new_version_triggers.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ jobs:
1414
steps:
1515
- name: Rebuild tip.cuelang.org
1616
run: 'curl -f -s -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT
17-
}} --request POST --data-binary "{\"event_type\": \"Re-test post release of
17+
}} --request POST --data-binary "{\"event_type\":\"Re-test post release of
1818
${GITHUB_REF##refs/tags/}\"}" https://api.github.com/repos/cue-lang/cuelang.org/dispatches'
1919
- name: Trigger unity build
2020
run: 'curl -f -s -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT
21-
}} --request POST --data-binary "{\"event_type\": \"Check against CUE ${GITHUB_REF##refs/tags/}\",
22-
\"client_payload\": {\"type\": \"unity\", \"payload\": {\"versions\": \"\\\"${GITHUB_REF##refs/tags/}\\\"\"}}}"
21+
}} --request POST --data-binary "{\"event_type\":\"Check against CUE ${GITHUB_REF##refs/tags/}\",\"client_payload\":{\"type\":\"unity\",\"payload\":{\"versions\":\"\\\"${GITHUB_REF##refs/tags/}\\\"\"}}}"
2322
https://api.github.com/repos/cue-sh/unity/dispatches'

.github/workflows/tip_triggers.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ jobs:
1717
}}
1818
- name: Trigger unity build
1919
run: 'curl -f -s -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT
20-
}} --request POST --data-binary "{\"event_type\": \"Check against ${GITHUB_SHA}\",
21-
\"client_payload\": {\"type\": \"unity\", \"payload\": {\"versions\": \"\\\"commit:${GITHUB_SHA}\\\"\"}}}"
20+
}} --request POST --data-binary "{\"event_type\":\"Check against ${GITHUB_SHA}\",\"client_payload\":{\"type\":\"unity\",\"payload\":{\"versions\":\"\\\"commit:${GITHUB_SHA}\\\"\"}}}"
2221
https://api.github.com/repos/cue-sh/unity/dispatches'

cmd/cue/cmd/testdata/script/cmd_github.txt

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ jobs:
6464
steps:
6565
- name: Rebuild tip.cuelang.org
6666
run: 'curl -f -s -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT
67-
}} --request POST --data-binary "{\"event_type\": \"Re-test post release of
67+
}} --request POST --data-binary "{\"event_type\":\"Re-test post release of
6868
${GITHUB_REF##refs/tags/}\"}" https://api.github.com/repos/cue-lang/cuelang.org/dispatches'
6969
- name: Trigger unity build
7070
run: 'curl -f -s -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT
71-
}} --request POST --data-binary "{\"event_type\": \"Check against CUE ${GITHUB_REF##refs/tags/}\",
72-
\"client_payload\": {\"type\": \"unity\", \"payload\": {\"versions\": \"\\\"${GITHUB_REF##refs/tags/}\\\"\"}}}"
71+
}} --request POST --data-binary "{\"event_type\":\"Check against CUE ${GITHUB_REF##refs/tags/}\",\"client_payload\":{\"type\":\"unity\",\"payload\":{\"versions\":\"\\\"${GITHUB_REF##refs/tags/}\\\"\"}}}"
7372
https://api.github.com/repos/cue-sh/unity/dispatches'
7473
-- .github/workflows/release.yml.golden --
7574
# Generated by internal/ci/ci_tool.cue; do not edit
@@ -330,8 +329,7 @@ jobs:
330329
}}
331330
- name: Trigger unity build
332331
run: 'curl -f -s -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT
333-
}} --request POST --data-binary "{\"event_type\": \"Check against ${GITHUB_SHA}\",
334-
\"client_payload\": {\"type\": \"unity\", \"payload\": {\"versions\": \"\\\"commit:${GITHUB_SHA}\\\"\"}}}"
332+
}} --request POST --data-binary "{\"event_type\":\"Check against ${GITHUB_SHA}\",\"client_payload\":{\"type\":\"unity\",\"payload\":{\"versions\":\"\\\"commit:${GITHUB_SHA}\\\"\"}}}"
335333
https://api.github.com/repos/cue-sh/unity/dispatches'
336334
-- internal/ci/ci_tool.cue --
337335
// Copyright 2021 The CUE Authors
@@ -1360,8 +1358,17 @@ tip_triggers: _#bashWorkflow & {
13601358
name: "Rebuild tip.cuelang.org"
13611359
run: "\(_#curl) -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.CuelangOrgTipRebuildHook }}"
13621360
}, {
1361+
_#arg: {
1362+
event_type: "Check against ${GITHUB_SHA}"
1363+
client_payload: {
1364+
type: "unity"
1365+
payload: versions: """
1366+
"commit:${GITHUB_SHA}"
1367+
"""
1368+
}
1369+
}
13631370
name: "Trigger unity build"
1364-
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Check against ${GITHUB_SHA}\\\", \\\"client_payload\\\": {\\\"type\\\": \\\"unity\\\", \\\"payload\\\": {\\\"versions\\\": \\\"\\\\\\\"commit:${GITHUB_SHA}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches"
1371+
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(strconv.Quote(encjson.Marshal(_#arg))) https://api.github.com/repos/cue-sh/unity/dispatches"
13651372
}]
13661373
}
13671374
}
@@ -1371,11 +1378,23 @@ new_version_triggers: _#bashWorkflow & {
13711378
jobs: push: {
13721379
"runs-on": _#linuxMachine
13731380
steps: [{
1381+
_#arg: {
1382+
event_type: "Re-test post release of ${GITHUB_REF##refs/tags/}"
1383+
}
13741384
name: "Rebuild tip.cuelang.org"
1375-
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Re-test post release of ${GITHUB_REF##refs/tags/}\\\"}\" https://api.github.com/repos/cue-lang/cuelang.org/dispatches"
1385+
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(strconv.Quote(encjson.Marshal(_#arg))) https://api.github.com/repos/cue-lang/cuelang.org/dispatches"
13761386
}, {
1387+
_#arg: {
1388+
event_type: "Check against CUE ${GITHUB_REF##refs/tags/}"
1389+
client_payload: {
1390+
type: "unity"
1391+
payload: versions: """
1392+
"${GITHUB_REF##refs/tags/}"
1393+
"""
1394+
}
1395+
}
13771396
name: "Trigger unity build"
1378-
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Check against CUE ${GITHUB_REF##refs/tags/}\\\", \\\"client_payload\\\": {\\\"type\\\": \\\"unity\\\", \\\"payload\\\": {\\\"versions\\\": \\\"\\\\\\\"${GITHUB_REF##refs/tags/}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches"
1397+
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(strconv.Quote(encjson.Marshal(_#arg))) https://api.github.com/repos/cue-sh/unity/dispatches"
13791398
}]
13801399
}
13811400
}

cue/testdata/eval/github.txtar

Lines changed: 97 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,17 @@ tip_triggers: _#bashWorkflow & {
226226
name: "Rebuild tip.cuelang.org"
227227
run: "\(_#curl) -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.CuelangOrgTipRebuildHook }}"
228228
}, {
229+
_#arg: {
230+
event_type: "Check against ${GITHUB_SHA}"
231+
client_payload: {
232+
type: "unity"
233+
payload: versions: """
234+
"commit:${GITHUB_SHA}"
235+
"""
236+
}
237+
}
229238
name: "Trigger unity build"
230-
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Check against ${GITHUB_SHA}\\\", \\\"client_payload\\\": {\\\"type\\\": \\\"unity\\\", \\\"payload\\\": {\\\"versions\\\": \\\"\\\\\\\"commit:${GITHUB_SHA}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches"
239+
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(strconv.Quote(encjson.Marshal(_#arg))) https://api.github.com/repos/cue-sh/unity/dispatches"
231240
}]
232241
}
233242
}
@@ -237,11 +246,23 @@ new_version_triggers: _#bashWorkflow & {
237246
jobs: push: {
238247
"runs-on": _#linuxMachine
239248
steps: [{
249+
_#arg: {
250+
event_type: "Re-test post release of ${GITHUB_REF##refs/tags/}"
251+
}
240252
name: "Rebuild tip.cuelang.org"
241-
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Re-test post release of ${GITHUB_REF##refs/tags/}\\\"}\" https://api.github.com/repos/cue-lang/cuelang.org/dispatches"
253+
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(strconv.Quote(encjson.Marshal(_#arg))) https://api.github.com/repos/cue-lang/cuelang.org/dispatches"
242254
}, {
255+
_#arg: {
256+
event_type: "Check against CUE ${GITHUB_REF##refs/tags/}"
257+
client_payload: {
258+
type: "unity"
259+
payload: versions: """
260+
"${GITHUB_REF##refs/tags/}"
261+
"""
262+
}
263+
}
243264
name: "Trigger unity build"
244-
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Check against CUE ${GITHUB_REF##refs/tags/}\\\", \\\"client_payload\\\": {\\\"type\\\": \\\"unity\\\", \\\"payload\\\": {\\\"versions\\\": \\\"\\\\\\\"${GITHUB_REF##refs/tags/}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches"
265+
run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(strconv.Quote(encjson.Marshal(_#arg))) https://api.github.com/repos/cue-sh/unity/dispatches"
245266
}]
246267
}
247268
}
@@ -1512,8 +1533,17 @@ import "strings"
15121533
run: (string){ "curl -f -s -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.CuelangOrgTipRebuildHook }}" }
15131534
}
15141535
1: (#struct){
1536+
_#arg(:ci): (#struct){
1537+
event_type: (string){ "Check against ${GITHUB_SHA}" }
1538+
client_payload: (#struct){
1539+
type: (string){ "unity" }
1540+
payload: (#struct){
1541+
versions: (string){ "\"commit:${GITHUB_SHA}\"" }
1542+
}
1543+
}
1544+
}
15151545
name: (string){ "Trigger unity build" }
1516-
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Check against ${GITHUB_SHA}\\\", \\\"client_payload\\\": {\\\"type\\\": \\\"unity\\\", \\\"payload\\\": {\\\"versions\\\": \\\"\\\\\\\"commit:${GITHUB_SHA}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches" }
1546+
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\":\\\"Check against ${GITHUB_SHA}\\\",\\\"client_payload\\\":{\\\"type\\\":\\\"unity\\\",\\\"payload\\\":{\\\"versions\\\":\\\"\\\\\\\"commit:${GITHUB_SHA}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches" }
15171547
}
15181548
}
15191549
defaults: (#struct){
@@ -1579,12 +1609,24 @@ import "strings"
15791609
"runs-on": (string){ "ubuntu-18.04" }
15801610
steps: (#list){
15811611
0: (#struct){
1612+
_#arg(:ci): (#struct){
1613+
event_type: (string){ "Re-test post release of ${GITHUB_REF##refs/tags/}" }
1614+
}
15821615
name: (string){ "Rebuild tip.cuelang.org" }
1583-
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Re-test post release of ${GITHUB_REF##refs/tags/}\\\"}\" https://api.github.com/repos/cue-lang/cuelang.org/dispatches" }
1616+
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\":\\\"Re-test post release of ${GITHUB_REF##refs/tags/}\\\"}\" https://api.github.com/repos/cue-lang/cuelang.org/dispatches" }
15841617
}
15851618
1: (#struct){
1619+
_#arg(:ci): (#struct){
1620+
event_type: (string){ "Check against CUE ${GITHUB_REF##refs/tags/}" }
1621+
client_payload: (#struct){
1622+
type: (string){ "unity" }
1623+
payload: (#struct){
1624+
versions: (string){ "\"${GITHUB_REF##refs/tags/}\"" }
1625+
}
1626+
}
1627+
}
15861628
name: (string){ "Trigger unity build" }
1587-
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Check against CUE ${GITHUB_REF##refs/tags/}\\\", \\\"client_payload\\\": {\\\"type\\\": \\\"unity\\\", \\\"payload\\\": {\\\"versions\\\": \\\"\\\\\\\"${GITHUB_REF##refs/tags/}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches" }
1629+
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\":\\\"Check against CUE ${GITHUB_REF##refs/tags/}\\\",\\\"client_payload\\\":{\\\"type\\\":\\\"unity\\\",\\\"payload\\\":{\\\"versions\\\":\\\"\\\\\\\"${GITHUB_REF##refs/tags/}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches" }
15881630
}
15891631
}
15901632
defaults: (#struct){
@@ -2087,8 +2129,17 @@ import "strings"
20872129
run: (string){ "curl -f -s -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.CuelangOrgTipRebuildHook }}" }
20882130
}
20892131
1: (#struct){
2132+
_#arg(:ci): (#struct){
2133+
event_type: (string){ "Check against ${GITHUB_SHA}" }
2134+
client_payload: (#struct){
2135+
type: (string){ "unity" }
2136+
payload: (#struct){
2137+
versions: (string){ "\"commit:${GITHUB_SHA}\"" }
2138+
}
2139+
}
2140+
}
20902141
name: (string){ "Trigger unity build" }
2091-
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Check against ${GITHUB_SHA}\\\", \\\"client_payload\\\": {\\\"type\\\": \\\"unity\\\", \\\"payload\\\": {\\\"versions\\\": \\\"\\\\\\\"commit:${GITHUB_SHA}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches" }
2142+
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\":\\\"Check against ${GITHUB_SHA}\\\",\\\"client_payload\\\":{\\\"type\\\":\\\"unity\\\",\\\"payload\\\":{\\\"versions\\\":\\\"\\\\\\\"commit:${GITHUB_SHA}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches" }
20922143
}
20932144
}
20942145
defaults: (#struct){
@@ -2151,12 +2202,24 @@ import "strings"
21512202
"runs-on": (string){ "ubuntu-18.04" }
21522203
steps: (#list){
21532204
0: (#struct){
2205+
_#arg(:ci): (#struct){
2206+
event_type: (string){ "Re-test post release of ${GITHUB_REF##refs/tags/}" }
2207+
}
21542208
name: (string){ "Rebuild tip.cuelang.org" }
2155-
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Re-test post release of ${GITHUB_REF##refs/tags/}\\\"}\" https://api.github.com/repos/cue-lang/cuelang.org/dispatches" }
2209+
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\":\\\"Re-test post release of ${GITHUB_REF##refs/tags/}\\\"}\" https://api.github.com/repos/cue-lang/cuelang.org/dispatches" }
21562210
}
21572211
1: (#struct){
2212+
_#arg(:ci): (#struct){
2213+
event_type: (string){ "Check against CUE ${GITHUB_REF##refs/tags/}" }
2214+
client_payload: (#struct){
2215+
type: (string){ "unity" }
2216+
payload: (#struct){
2217+
versions: (string){ "\"${GITHUB_REF##refs/tags/}\"" }
2218+
}
2219+
}
2220+
}
21582221
name: (string){ "Trigger unity build" }
2159-
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\": \\\"Check against CUE ${GITHUB_REF##refs/tags/}\\\", \\\"client_payload\\\": {\\\"type\\\": \\\"unity\\\", \\\"payload\\\": {\\\"versions\\\": \\\"\\\\\\\"${GITHUB_REF##refs/tags/}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches" }
2222+
run: (string){ "curl -f -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \"{\\\"event_type\\\":\\\"Check against CUE ${GITHUB_REF##refs/tags/}\\\",\\\"client_payload\\\":{\\\"type\\\":\\\"unity\\\",\\\"payload\\\":{\\\"versions\\\":\\\"\\\\\\\"${GITHUB_REF##refs/tags/}\\\\\\\"\\\"}}}\" https://api.github.com/repos/cue-sh/unity/dispatches" }
21602223
}
21612224
}
21622225
defaults: (#struct){
@@ -2267,7 +2330,7 @@ import "strings"
22672330
name: (string){ "Set go build tags" }
22682331
run: (_|_){
22692332
// [incomplete] _#setGoBuildTags.run: invalid interpolation: non-concrete value string (type string):
2270-
// ./workflows.cue:272:10
2333+
// ./workflows.cue:293:10
22712334
}
22722335
}
22732336
_#installGo(:ci): (#struct){
@@ -2590,8 +2653,17 @@ import "strings"
25902653
run: "\(〈4;_#curl〉) -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.CuelangOrgTipRebuildHook }}"
25912654
},
25922655
{
2656+
_#arg: {
2657+
event_type: "Check against ${GITHUB_SHA}"
2658+
client_payload: {
2659+
type: "unity"
2660+
payload: {
2661+
versions: "\"commit:${GITHUB_SHA}\""
2662+
}
2663+
}
2664+
}
25932665
name: "Trigger unity build"
2594-
run: "\(〈4;_#curl〉) -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary "{\"event_type\": \"Check against ${GITHUB_SHA}\", \"client_payload\": {\"type\": \"unity\", \"payload\": {\"versions\": \"\\\"commit:${GITHUB_SHA}\\\"\"}}}" https://api.github.com/repos/cue-sh/unity/dispatches"
2666+
run: "\(〈4;_#curl〉) -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(〈import;strconv〉.Quote(〈import;"encoding/json"〉.Marshal(〈0;_#arg〉))) https://api.github.com/repos/cue-sh/unity/dispatches"
25952667
},
25962668
]
25972669
}
@@ -2611,12 +2683,24 @@ import "strings"
26112683
"runs-on": 〈3;_#linuxMachine〉
26122684
steps: [
26132685
{
2686+
_#arg: {
2687+
event_type: "Re-test post release of ${GITHUB_REF##refs/tags/}"
2688+
}
26142689
name: "Rebuild tip.cuelang.org"
2615-
run: "\(〈4;_#curl〉) -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary "{\"event_type\": \"Re-test post release of ${GITHUB_REF##refs/tags/}\"}" https://api.github.com/repos/cue-lang/cuelang.org/dispatches"
2690+
run: "\(〈4;_#curl〉) -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(〈import;strconv〉.Quote(〈import;"encoding/json"〉.Marshal(〈0;_#arg〉))) https://api.github.com/repos/cue-lang/cuelang.org/dispatches"
26162691
},
26172692
{
2693+
_#arg: {
2694+
event_type: "Check against CUE ${GITHUB_REF##refs/tags/}"
2695+
client_payload: {
2696+
type: "unity"
2697+
payload: {
2698+
versions: "\"${GITHUB_REF##refs/tags/}\""
2699+
}
2700+
}
2701+
}
26182702
name: "Trigger unity build"
2619-
run: "\(〈4;_#curl〉) -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary "{\"event_type\": \"Check against CUE ${GITHUB_REF##refs/tags/}\", \"client_payload\": {\"type\": \"unity\", \"payload\": {\"versions\": \"\\\"${GITHUB_REF##refs/tags/}\\\"\"}}}" https://api.github.com/repos/cue-sh/unity/dispatches"
2703+
run: "\(〈4;_#curl〉) -H "Content-Type: application/json" -u cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} --request POST --data-binary \(〈import;strconv〉.Quote(〈import;"encoding/json"〉.Marshal(〈0;_#arg〉))) https://api.github.com/repos/cue-sh/unity/dispatches"
26202704
},
26212705
]
26222706
}

0 commit comments

Comments
 (0)