Utilities for implementing GitHub Actions
This crate provides basic utilities that help you develop custom GitHub Actions in Rust.
Environment Variables
use github_workspace;
use File;
let workspace = github_workspace;
let my_file = open?
Messages
Easily generate workflow commands; e.g.,
use ;
debug!;
error!;
mask!;
// set_failed! prints `::error::...` and exits with status 1
if !ok
Environment Files
Append to the workflow's environment files ($GITHUB_ENV, $GITHUB_OUTPUT,
$GITHUB_PATH, $GITHUB_STEP_SUMMARY):
use ;
use env;
use OpenOptions;
let mut env_file = new.append.open?;
append_name_value?;
let mut path_file = new.append.open?;
append_path?;
let mut summary = new.append.open?;
append_summary?;
Project Template
To get started with GitHub Actions in Rust, use the following project template:
cargo generate https://github.com/ecliptical/rust-gha-template