-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/ci: pass access token to releaser step
A previous CL (https://cuelang.org/cl/1201986) started using the Central Registry for github actions schemas, but the `cue cmd release` command run in `internal/ci` also depends on some of the same CUE code, so provide the token to that step too, making it easily reusable if we find more steps that need it. Signed-off-by: Roger Peppe <[email protected]> Change-Id: Ibb4a8b0cbb1bb2af2e8797f1b934fcbae410aa58 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202051 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information
Showing
4 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2024 The CUE Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package github | ||
|
||
import ( | ||
"github.com/cue-tmp/jsonschema-pub/exp1/githubactions" | ||
) | ||
|
||
// _registryReadOnlyAccessStep defines a step that configures | ||
// a read-only Central Registry access credential. The actual | ||
// command should be placed in the _run field. | ||
_registryReadOnlyAccessStep: githubactions.#Step & { | ||
_run!: string | ||
env: { | ||
// Note: this token has read-only access to the registry | ||
// and is used only because we need some credentials | ||
// to pull dependencies from the Central Registry. | ||
CUE_LOGINS: "${{ secrets.NOTCUECKOO_CUE_LOGINS }}" | ||
} | ||
run: """ | ||
export CUE_CONFIG_DIR=$(mktemp -d) | ||
echo "$CUE_LOGINS" > $CUE_CONFIG_DIR/logins.json | ||
\(_run) | ||
""" | ||
} |
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