#[cfg(not(feature = "derive"))] fn main() { panic!(r#"feature "derive" must be enabled for this example"#); } #[cfg(feature = "derive")] fn main() { use action_core::{self as action, Action, Parse}; use std::collections::HashMap; #[derive(Action)] #[action = "./examples/myaction.yml"] struct MyAction {} // parse all values into a map let inputs: HashMap> = MyAction::parse(); dbg!(&inputs); // parse single value as type T let resolve_versions: Option = MyAction::resolve_versions::().unwrap(); dbg!(&resolve_versions); // parse single value as type T using string name // this is not recommended, as changes to the action.yml file go unnoticed. let value: Option = action::get_input::("input name").unwrap(); dbg!(&value); }