Skip to content

Commit c3f30d8

Browse files
committed
ci: name dispatch workflow differently to default branch push workflow
This allows the status of the two workflows to be distinguished, which is important for the status badges offered by GitHub (at the moment we show the status of the "Test" workflow, which means that a broken dispatch build can show a red status despite the latest master build succeeding). Whilst we are at it, re-enable the go:generate of the workflows themselves. Change-Id: I2e93ab6839395fc92fec5f1f869c96854b63b22f Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6887 Reviewed-by: Marcel van Lohuizen <[email protected]> Reviewed-by: CUE cueckoo <[email protected]>
1 parent 6f84d11 commit c3f30d8

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.github/workflows/gen.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
package workflows
22

3-
// Disable generation of this script for now.
4-
// go:generate go run cuelang.org/go/cmd/cue cmd genworkflows cuelang.org/go/internal/ci
3+
//go:generate go run cuelang.org/go/cmd/cue cmd genworkflows cuelang.org/go/internal/ci

.github/workflows/test_dispatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by internal/ci/ci_tool.cue; do not edit
22

3-
name: Test
3+
name: Test Dispatch
44
env:
55
GERRIT_COOKIE: ${{ secrets.gerritCookie }}
66
on:

internal/ci/workflows.cue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
workflowsDir: *"./" | string @tag(workflowsDir)
99

10-
workflows: [...{file: string, schema: (json.#Workflow&{})}]
10+
workflows: [...{file: string, schema: (json.#Workflow & {})}]
1111
workflows: [
1212
{
1313
file: "test.yml"
@@ -30,7 +30,7 @@ workflows: [
3030
// TODO: drop when cuelang.org/issue/390 is fixed.
3131
// Declare definitions for sub-schemas
3232
#job: ((json.#Workflow & {}).jobs & {x: _}).x
33-
#step: ((#job & {steps: _}).steps & [_])[0]
33+
#step: ((#job & {steps: _}).steps & [_])[0]
3434

3535
#latestGo: "1.14.3"
3636

@@ -161,7 +161,7 @@ test_dispatch: json.#Workflow & {
161161
}
162162
}
163163

164-
name: "Test"
164+
name: "Test Dispatch"
165165
env: GERRIT_COOKIE: "${{ secrets.gerritCookie }}"
166166
on: ["repository_dispatch"]
167167
defaults: run: shell: "bash"

0 commit comments

Comments
 (0)