Skip to content

Commit

Permalink
internal/ci: switch to '.yaml' workflow file extension
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: If0a3c1c1d392782c25b3f15f0d75ff32cbc6933c
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200723
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
  • Loading branch information
myitcv committed Sep 5, 2024
1 parent e97c624 commit 2d329b5
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
echo Latest commit: $sha
echo "Trigger workflow on cue-lang/cue"
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\"}"
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\"}"
# Ensure that the trybot repo has the latest commit for
# this branch. If the force-push results in a commit
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
# We are up-to-date, i.e. the push did nothing, hence we need to trigger a workflow_dispatch
# in the trybot repo.
echo "Trigger workflow on cue-lang/cue-trybot"
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\"}"
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\"}"
else
echo "Force-push to cue-lang/cue-trybot did work; nothing to do"
fi
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/ci/base/base.cue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ botGerritHubUser: *botGitHubUser | string
botGerritHubUserPasswordSecretsKey: *(strings.ToUpper(botGitHubUser) + "_GERRITHUB_PASSWORD") | string
botGerritHubUserEmail: *botGitHubUserEmail | string

workflowFileExtension: ".yml"
workflowFileExtension: ".yaml"

linuxMachine: string

Expand Down
2 changes: 1 addition & 1 deletion internal/ci/base/github.cue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ checkoutCode: {

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

curlGitHubAPI: {
Expand Down
2 changes: 2 additions & 0 deletions internal/ci/repo/repo.cue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (

base

earlyChecks: run: "go run ./internal/ci/checks"

githubRepositoryPath: "cue-lang/cue"

unityRepositoryPath: "cue-unity/unity-private"
Expand Down

0 comments on commit 2d329b5

Please sign in to comment.