pub fn set_output<K, V>(key: K, value: V) -> Result<(), FileCommandError>Examples found in repository?
examples/wasm.rs (line 15)
3fn main() -> Result<(), FileCommandError> {
4 let name = get_input("name").unwrap_or_else(|_| "wasm".to_string());
5 let dry_run = get_bool_input("dry_run").unwrap_or_default();
6
7 group!("wasm github-actions example");
8 info!("hello {}", name);
9 info!("debug={}", is_debug());
10 info!("dry_run={}", dry_run);
11 notice!("running through wasmer");
12
13 set_secret("wasm-secret");
14 export_variable("WASM_EXAMPLE", "ok")?;
15 set_output("wasm-example", "ok")?;
16
17 Ok(())
18}More examples
examples/main.rs (line 36)
3fn main() {
4 info!("debug={}", is_debug());
5 info!(get_input("name").unwrap_or("default".to_string()));
6 info!(get_bool_input("bool").unwrap_or_default());
7 info!(
8 get_multiline_input("multiline")
9 .unwrap_or_default()
10 .join("\\n")
11 );
12 info!("state={}", get_state("name").unwrap_or_default());
13
14 {
15 stop_commands!("token");
16 info!("Message")
17 }
18
19 {
20 stop_commands!();
21 info!("Message")
22 }
23
24 group!("Main logs");
25
26 info!("Info");
27 debug!("Debug");
28 error!(format!("Error {}", 1), title: "Title");
29 error!("message", title: "title", file: "file", col: 1, end_column: 1, line: 1, end_line: 1);
30 warn!("Warning");
31 notice!("Notice");
32
33 set_secret("secret");
34
35 export_variable("key", format!("value {}", "env")).unwrap();
36 set_output("key", "value").unwrap();
37 save_state("key", "value").unwrap();
38
39 add_path("path").unwrap();
40}