From a8285e081f4e6a77a8891e1b3f514bd4b222db77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 20 Nov 2024 12:52:20 +0000 Subject: [PATCH] internal/ci: switch away from a notcueckoo logins.json secret MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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í Change-Id: Ia8dea3b0ccccbd5736798c9320999319926f8d63 --- .github/workflows/trybot.yaml | 2 +- _scripts/cacheWarm.bash | 2 +- internal/ci/github/trybot.cue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trybot.yaml b/.github/workflows/trybot.yaml index 6b38f09f8e..fe7499a9f5 100644 --- a/.github/workflows/trybot.yaml +++ b/.github/workflows/trybot.yaml @@ -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 diff --git a/_scripts/cacheWarm.bash b/_scripts/cacheWarm.bash index f460b7cc54..6813d3579e 100755 --- a/_scripts/cacheWarm.bash +++ b/_scripts/cacheWarm.bash @@ -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 diff --git a/internal/ci/github/trybot.cue b/internal/ci/github/trybot.cue index 56a6530113..2bb2278734 100644 --- a/internal/ci/github/trybot.cue +++ b/internal/ci/github/trybot.cue @@ -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" },