Skip to content

Commit

Permalink
internal/ci: switch away from a notcueckoo logins.json secret
Browse files Browse the repository at this point in the history
Use the new org secret NOTCUECKOO_CUE_TOKEN with `cue login --token`.
While here, use CUE_TOKEN as the env var to pass it along to scripts,
which is what we use in the cue repo and seems more consistent.
There doesn't seem to be a need to namespace it to "cuelang",
given that everything in this repository relates to cuelang.org.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: Ia8dea3b0ccccbd5736798c9320999319926f8d63
  • Loading branch information
mvdan committed Nov 20, 2024
1 parent 04e6b52 commit a8285e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/trybot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
run: _scripts/contentLint.bash
- name: Populate CUE dependency cache
env:
CUELANG_CUE_LOGINS: ${{ secrets.NOTCUECKOO_CUE_LOGINS }}
CUE_TOKEN: ${{ secrets.NOTCUECKOO_CUE_TOKEN }}
run: _scripts/cacheWarm.bash
- name: Check site CUE configuration
run: _scripts/runPreprocessor.bash execute --check
Expand Down
2 changes: 1 addition & 1 deletion _scripts/cacheWarm.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ function cleanup() { rm -rfv "${CUE_CONFIG_DIR}"; }

export CUE_CONFIG_DIR="$(mktemp -d)"
trap cleanup EXIT
echo "$CUELANG_CUE_LOGINS" >"$CUE_CONFIG_DIR/logins.json"
go run cuelang.org/go/cmd/cue login --token $CUE_TOKEN
go run cuelang.org/go/cmd/cue mod tidy --check
2 changes: 1 addition & 1 deletion internal/ci/github/trybot.cue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ workflows: trybot: _repo.bashWorkflow & {
// TODO: add cache dir to CI cache when it's visible via https://cuelang.org/issue/2838.
githubactions.#Step & {
name: "Populate CUE dependency cache"
env: CUELANG_CUE_LOGINS: "${{ secrets.NOTCUECKOO_CUE_LOGINS }}"
env: CUE_TOKEN: "${{ secrets.NOTCUECKOO_CUE_TOKEN }}"
run: "_scripts/cacheWarm.bash"
},

Expand Down

0 comments on commit a8285e0

Please sign in to comment.