Skip to content

Commit 2894618

Browse files
authored
Fix nightly build (#11726)
followup #11517 It turned out that `env` context is not available in the `jobs.<job-id>.with` key.
1 parent 979e0e3 commit 2894618

File tree

3 files changed

+5
-27
lines changed

3 files changed

+5
-27
lines changed

.github/workflows/nightly.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
uses: ./.github/workflows/promote.yml
2222
with:
2323
designator: nightly
24-
ydoc: ${{ env.ENV_INPUTS_YDOC }}
24+
ydoc: ${{ inputs.ydoc || 'nodejs' }}
2525
secrets: inherit
2626
env:
2727
ENSO_BUILD_SKIP_VERSION_CHECK: "true"
28-
ENV_INPUTS_YDOC: ${{ inputs.ydoc || nodejs }}

build/build/src/ci/input.rs

-19
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,6 @@ pub mod name {
1212
pub const YDOC: &str = "ydoc";
1313
}
1414

15-
pub mod env {
16-
use ide_ci::env::accessor::RawVariable;
17-
18-
#[derive(Clone, Copy, Debug, Default)]
19-
pub struct Ydoc;
20-
21-
impl RawVariable for Ydoc {
22-
fn name(&self) -> &str {
23-
"ENV_INPUTS_YDOC"
24-
}
25-
}
26-
27-
impl From<Ydoc> for String {
28-
fn from(val: Ydoc) -> Self {
29-
val.name().to_owned()
30-
}
31-
}
32-
}
33-
3415
pub fn designator() -> WorkflowDispatchInput {
3516
WorkflowDispatchInput::new_choice(
3617
"What kind of release should be promoted.",

build/build/src/ci_gen.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use crate::version::ENSO_RELEASE_MODE;
1111
use crate::version::ENSO_VERSION;
1212

1313
use ide_ci::actions::workflow::definition::checkout_repo_step;
14-
use ide_ci::actions::workflow::definition::env_expression;
1514
use ide_ci::actions::workflow::definition::get_input;
1615
use ide_ci::actions::workflow::definition::get_input_expression;
1716
use ide_ci::actions::workflow::definition::is_non_windows_runner;
@@ -502,14 +501,13 @@ pub fn nightly() -> Result<Workflow> {
502501
};
503502

504503
let mut workflow = Workflow { on, name: "Nightly Release".into(), ..default() };
505-
// Scheduled workflows do not support input parameters. Instead we provide env variable
506-
// expression with default. Feature request is tracked by https://github.com/orgs/community/discussions/74698
507-
let input_env_ydoc = format!("{} || {}", get_input(input::name::YDOC), input_ydoc_default);
508-
workflow.env(input::env::Ydoc, wrap_expression(input_env_ydoc));
504+
// Scheduled workflows do not support input parameters. We need to provide an explicit default
505+
// value. Feature request is tracked by https://github.com/orgs/community/discussions/74698
506+
let input_ydoc = format!("{} || '{}'", get_input(input::name::YDOC), input_ydoc_default);
509507

510508
let job = workflow_call_job("Promote nightly", PROMOTE_WORKFLOW_PATH)
511509
.with_with(input::name::DESIGNATOR, Designation::Nightly.as_ref())
512-
.with_with(input::name::YDOC, env_expression(&input::env::Ydoc));
510+
.with_with(input::name::YDOC, wrap_expression(input_ydoc));
513511
workflow.add_job(job);
514512
Ok(workflow)
515513
}

0 commit comments

Comments
 (0)