actions-core

Crates.ioactions-core
lib.rsactions-core
version0.0.2
sourcesrc
created_at2020-04-01 18:49:07.423425
updated_at2020-04-01 19:29:35.955901
descriptionGithub Actions Core
homepagehttps://github.com/kjvalencik/actions/tree/master/crates/core
repositoryhttps://github.com/kjvalencik/actions.git
max_upload_size
id225299
size15,239
K.J. Valencik (kjvalencik)

documentation

https://docs.rs/actions-core/

README

actions-core

Core functions for inputs, outputs, logging, setting environment variables, and masking secrets.

Example

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!");
}
Commit count: 47

cargo fmt