Skip to content

Commit 2d329b5

Browse files
committed
internal/ci: switch to '.yaml' workflow file extension
This alignment with the filetype 'yaml' makese logic elsewhere simpler. Specifically the `@export`-like behaviour of writefs in https://cuelang.org/cl/1200710. Also update the base earlyChecks declaration to default to a pseudo-version of the main CUE repo. This allows an override in this repo to use the "current" earlyChecks package. This allows the base package to be "copied" (for now) to other repos without further changes/overrides. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: If0a3c1c1d392782c25b3f15f0d75ff32cbc6933c Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200723 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
1 parent e97c624 commit 2d329b5

File tree

9 files changed

+6
-4
lines changed

9 files changed

+6
-4
lines changed

.github/workflows/evict_caches.yml renamed to .github/workflows/evict_caches.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
echo Latest commit: $sha
9090
9191
echo "Trigger workflow on cue-lang/cue"
92-
curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail-with-body -X POST https://api.github.com/repos/cue-lang/cue/actions/workflows/trybot.yml/dispatches -d "{\"ref\":\"$j\"}"
92+
curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail-with-body -X POST https://api.github.com/repos/cue-lang/cue/actions/workflows/trybot.yaml/dispatches -d "{\"ref\":\"$j\"}"
9393
9494
# Ensure that the trybot repo has the latest commit for
9595
# this branch. If the force-push results in a commit
@@ -121,7 +121,7 @@ jobs:
121121
# We are up-to-date, i.e. the push did nothing, hence we need to trigger a workflow_dispatch
122122
# in the trybot repo.
123123
echo "Trigger workflow on cue-lang/cue-trybot"
124-
curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail-with-body -X POST https://api.github.com/repos/cue-lang/cue-trybot/actions/workflows/trybot.yml/dispatches -d "{\"ref\":\"$j\"}"
124+
curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail-with-body -X POST https://api.github.com/repos/cue-lang/cue-trybot/actions/workflows/trybot.yaml/dispatches -d "{\"ref\":\"$j\"}"
125125
else
126126
echo "Force-push to cue-lang/cue-trybot did work; nothing to do"
127127
fi
File renamed without changes.
File renamed without changes.

internal/ci/base/base.cue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ botGerritHubUser: *botGitHubUser | string
5555
botGerritHubUserPasswordSecretsKey: *(strings.ToUpper(botGitHubUser) + "_GERRITHUB_PASSWORD") | string
5656
botGerritHubUserEmail: *botGitHubUserEmail | string
5757

58-
workflowFileExtension: ".yml"
58+
workflowFileExtension: ".yaml"
5959

6060
linuxMachine: string
6161

internal/ci/base/github.cue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ checkoutCode: {
137137

138138
earlyChecks: json.#step & {
139139
name: "Early git and code sanity checks"
140-
run: "go run ./internal/ci/checks"
140+
run: *"go run cuelang.org/go/internal/ci/checks@v0.11.0-0.dev.0.20240903133435-46fb300df650" | string
141141
}
142142

143143
curlGitHubAPI: {

internal/ci/repo/repo.cue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99

1010
base
1111

12+
earlyChecks: run: "go run ./internal/ci/checks"
13+
1214
githubRepositoryPath: "cue-lang/cue"
1315

1416
unityRepositoryPath: "cue-unity/unity-private"

0 commit comments

Comments
 (0)