mirror of
https://github.com/denoland/deno.git
synced 2025-09-24 11:22:33 +00:00
fix(publish): permissionless dry-run in GHA (#22679)
Fixes https://github.com/denoland/deno/issues/22658
This commit is contained in:
parent
89d7bc693a
commit
156950828e
2 changed files with 8 additions and 1 deletions
|
@ -43,7 +43,13 @@ fn get_gh_oidc_env_vars() -> Option<Result<(String, String), AnyError>> {
|
|||
|
||||
pub fn get_auth_method(
|
||||
maybe_token: Option<String>,
|
||||
dry_run: bool,
|
||||
) -> Result<AuthMethod, AnyError> {
|
||||
if dry_run {
|
||||
// We don't authenticate in dry-run mode.
|
||||
return Ok(AuthMethod::Interactive);
|
||||
}
|
||||
|
||||
if let Some(token) = maybe_token {
|
||||
return Ok(AuthMethod::Token(token));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue