From cf8e067a279458361230def4b2cc2c47a0b6529e Mon Sep 17 00:00:00 2001 From: Dmitry Bushev Date: Sun, 1 Dec 2024 14:03:05 +0000 Subject: [PATCH] fix: promote nightly --- .github/workflows/nightly.yml | 3 +-- build/build/src/ci/input.rs | 19 ------------------- build/build/src/ci_gen.rs | 10 ++++------ 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d0e38fe639d3..48cd14051770 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -21,8 +21,7 @@ jobs: uses: ./.github/workflows/promote.yml with: designator: nightly - ydoc: ${{ env.ENV_INPUTS_YDOC }} + ydoc: ${{ inputs.ydoc || 'nodejs' }} secrets: inherit env: ENSO_BUILD_SKIP_VERSION_CHECK: "true" - ENV_INPUTS_YDOC: ${{ inputs.ydoc || nodejs }} diff --git a/build/build/src/ci/input.rs b/build/build/src/ci/input.rs index 7caf757bac5a..88c99be7af0a 100644 --- a/build/build/src/ci/input.rs +++ b/build/build/src/ci/input.rs @@ -12,25 +12,6 @@ pub mod name { pub const YDOC: &str = "ydoc"; } -pub mod env { - use ide_ci::env::accessor::RawVariable; - - #[derive(Clone, Copy, Debug, Default)] - pub struct Ydoc; - - impl RawVariable for Ydoc { - fn name(&self) -> &str { - "ENV_INPUTS_YDOC" - } - } - - impl From for String { - fn from(val: Ydoc) -> Self { - val.name().to_owned() - } - } -} - pub fn designator() -> WorkflowDispatchInput { WorkflowDispatchInput::new_choice( "What kind of release should be promoted.", diff --git a/build/build/src/ci_gen.rs b/build/build/src/ci_gen.rs index 91c407eaf7c9..aee020a8532e 100644 --- a/build/build/src/ci_gen.rs +++ b/build/build/src/ci_gen.rs @@ -11,7 +11,6 @@ use crate::version::ENSO_RELEASE_MODE; use crate::version::ENSO_VERSION; use ide_ci::actions::workflow::definition::checkout_repo_step; -use ide_ci::actions::workflow::definition::env_expression; use ide_ci::actions::workflow::definition::get_input; use ide_ci::actions::workflow::definition::get_input_expression; use ide_ci::actions::workflow::definition::is_non_windows_runner; @@ -502,14 +501,13 @@ pub fn nightly() -> Result { }; let mut workflow = Workflow { on, name: "Nightly Release".into(), ..default() }; - // Scheduled workflows do not support input parameters. Instead we provide env variable - // expression with default. Feature request is tracked by https://github.com/orgs/community/discussions/74698 - let input_env_ydoc = format!("{} || {}", get_input(input::name::YDOC), input_ydoc_default); - workflow.env(input::env::Ydoc, wrap_expression(input_env_ydoc)); + // Scheduled workflows do not support input parameters. We need to provide an explicit default + // value. Feature request is tracked by https://github.com/orgs/community/discussions/74698 + let input_ydoc = format!("{} || '{}'", get_input(input::name::YDOC), input_ydoc_default); let job = workflow_call_job("Promote nightly", PROMOTE_WORKFLOW_PATH) .with_with(input::name::DESIGNATOR, Designation::Nightly.as_ref()) - .with_with(input::name::YDOC, env_expression(&input::env::Ydoc)); + .with_with(input::name::YDOC, wrap_expression(input_ydoc)); workflow.add_job(job); Ok(workflow) }