Function get_context

Source
pub fn get_context() -> Result<Context, ActionsError>
Expand description

Gets environment variables provided by GitHub and injects them into an object

Returns a Context object

Could return an ActionsError error type.

use actions_github::context::get_context;
let data = get_context().unwrap();
println!("Event is {}", data.event_name);