actions-core 0.0.2

Github Actions Core
Documentation
  • Coverage
  • 42.86%
    12 out of 28 items documented12 out of 17 items with examples
  • Size
  • Source code size: 15.23 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.73 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • kjvalencik/actions
    12 1 5
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kjvalencik

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!");
}