1
Fork 0

Make all keys explicit in citool

Just to avoid surprises, the amount of used keys is not large.
This commit is contained in:
Jakub Beránek 2025-02-27 17:45:53 +01:00
parent 2b285cd5f0
commit 7ca7675b78

View file

@ -33,9 +33,12 @@ struct Job {
/// Should the job be only executed on a specific channel?
#[serde(default)]
only_on_channel: Option<String>,
/// Rest of attributes that will be passed through to GitHub actions
#[serde(flatten)]
extra_keys: BTreeMap<String, Value>,
/// Do not cancel the whole workflow if this job fails.
#[serde(default)]
continue_on_error: Option<bool>,
/// Free additional disk space in the job, by removing unused packages.
#[serde(default)]
free_disk: Option<bool>,
}
impl Job {
@ -105,8 +108,10 @@ struct GithubActionsJob {
full_name: String,
os: String,
env: BTreeMap<String, serde_json::Value>,
#[serde(flatten)]
extra_keys: BTreeMap<String, serde_json::Value>,
#[serde(skip_serializing_if = "Option::is_none")]
continue_on_error: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
free_disk: Option<bool>,
}
/// Type of workflow that is being executed on CI
@ -240,7 +245,8 @@ fn calculate_jobs(
full_name,
os: job.os,
env,
extra_keys: yaml_map_to_json(&job.extra_keys),
free_disk: job.free_disk,
continue_on_error: job.continue_on_error,
}
})
.collect();