Crates.io | actions-core |
lib.rs | actions-core |
version | 0.0.2 |
source | src |
created_at | 2020-04-01 18:49:07.423425 |
updated_at | 2020-04-01 19:29:35.955901 |
description | Github Actions Core |
homepage | https://github.com/kjvalencik/actions/tree/master/crates/core |
repository | https://github.com/kjvalencik/actions.git |
max_upload_size | |
id | 225299 |
size | 15,239 |
Core functions for inputs, outputs, logging, setting environment variables, and masking secrets.
use std::time::Duration;
use actions_core as core;
use anyhow::{Context, Result};
pub fn main() {
let ms = core::input("milliseconds")
.expect("milliseconds input required")?
.parse()
.expect("invalid milliseconds")?;
let ms = Duration::from_millis(ms);
std::thread::sleep(ms);
core::set_output("greeting", "Hello, World!");
}