-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/ci: update base from cue-lang/cue@46fb300d
DO NOT SUBMIT Need to update the commit on which we are baselining. With the one exception we we do: go run cuelang.org/go/internal/ci/[email protected] in the earlyChecks to side-step the fact that those checks are internal to the main CUE repo. Fixing that properly is covered by https://cuelang.org/issue/3435, which also includes more information on the root cause of this variation. Signed-off-by: Paul Jolly <[email protected]> Change-Id: Id4d1b1e34b01483efaca87339e51acca31c87135 Dispatch-Trailer: {"type":"trybot","CL":1200598,"patchset":2,"ref":"refs/changes/98/1200598/2","targetBranch":"master"}
- Loading branch information
Showing
5 changed files
with
46 additions
and
91 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,32 @@ bashWorkflow: json.#Workflow & { | |
jobs: [string]: defaults: run: shell: "bash" | ||
} | ||
|
||
installGo: json.#step & { | ||
name: "Install Go" | ||
uses: "actions/setup-go@v5" | ||
with: { | ||
// We do our own caching in setupGoActionsCaches. | ||
cache: false | ||
"go-version": string | ||
installGo: { | ||
#setupGo: json.#step & { | ||
name: "Install Go" | ||
uses: "actions/setup-go@v5" | ||
with: { | ||
// We do our own caching in setupGoActionsCaches. | ||
cache: false | ||
"go-version": string | ||
} | ||
} | ||
|
||
[ | ||
#setupGo, | ||
|
||
{ | ||
json.#step & { | ||
name: "Set common go env vars" | ||
run: """ | ||
go env -w GOTOOLCHAIN=local | ||
# Dump env for good measure | ||
go env | ||
""" | ||
} | ||
}, | ||
] | ||
} | ||
|
||
checkoutCode: { | ||
|
@@ -100,44 +118,7 @@ checkoutCode: { | |
|
||
earlyChecks: json.#step & { | ||
name: "Early git and code sanity checks" | ||
run: #""" | ||
# Ensure that commit messages have a blank second line. | ||
# We know that a commit message must be longer than a single | ||
# line because each commit must be signed-off. | ||
if git log --format=%B -n 1 HEAD | sed -n '2{/^$/{q1}}'; then | ||
echo "second line of commit message must be blank" | ||
exit 1 | ||
fi | ||
# All authors, including co-authors, must have a signed-off trailer by email. | ||
# Note that trailers are in the form "Name <email>", so grab the email with sed. | ||
# For now, we require the sorted lists of author and signer emails to match. | ||
# Note that this also fails if a commit isn't signed-off at all. | ||
# | ||
# In Gerrit we already enable a form of this via https://gerrit-review.googlesource.com/Documentation/project-configuration.html#require-signed-off-by, | ||
# but it does not support co-authors nor can it be used when testing GitHub PRs. | ||
commit_authors="$( | ||
{ | ||
git log -1 --pretty='%ae' | ||
git log -1 --pretty='%(trailers:key=Co-authored-by,valueonly)' | sed -ne 's/.* <\(.*\)>/\1/p' | ||
} | sort -u | ||
)" | ||
commit_signers="$( | ||
{ | ||
git log -1 --pretty='%(trailers:key=Signed-off-by,valueonly)' | sed -ne 's/.* <\(.*\)>/\1/p' | ||
} | sort -u | ||
)" | ||
if [[ "${commit_authors}" != "${commit_signers}" ]]; then | ||
echo "Error: commit author email addresses do not match signed-off-by trailers" | ||
echo | ||
echo "Authors:" | ||
echo "${commit_authors}" | ||
echo | ||
echo "Signers:" | ||
echo "${commit_signers}" | ||
exit 1 | ||
fi | ||
"""# | ||
run: "go run cuelang.org/go/internal/ci/[email protected]" | ||
} | ||
|
||
curlGitHubAPI: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters