Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nightly build #11726

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
19 changes: 0 additions & 19 deletions build/build/src/ci/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Ydoc> 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.",
Expand Down
10 changes: 4 additions & 6 deletions build/build/src/ci_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -502,14 +501,13 @@ pub fn nightly() -> Result<Workflow> {
};

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)
}
Expand Down
Loading