#github

gha

Utilities for developing custom GitHub Actions

7 releases

0.1.7 Sep 2, 2024
0.1.6 May 27, 2024
0.1.3 Apr 21, 2024

#643 in Development tools

Download history 17/week @ 2024-06-21 11/week @ 2024-06-28 6/week @ 2024-07-05 19/week @ 2024-07-26 22/week @ 2024-08-02 1/week @ 2024-08-23 145/week @ 2024-08-30 32/week @ 2024-09-06 12/week @ 2024-09-13 21/week @ 2024-09-20 20/week @ 2024-09-27 4/week @ 2024-10-04

59 downloads per month

MIT license

38KB
880 lines

Utilities for implementing GitHub Actions

This crate provides basic utilities that help you develop custom GitHub Actions in Rust.

Environment Variables

use gha::github_workspace;
use std::fs::File;

let workspace = github_workspace();
let my_file = File::open(workspace.append("my_file.yaml"))?

Messages

Easily generate workflow commands; e.g.,

use gha::{debug, error};

debug!("current dir: {:#?}", std::env::current_dir());
error!(title = "Validator", line = 42, "Invalid value");

Project Template

To get started with GitHub Actions in Rust, use the following project template:

cargo generate https://github.com/ecliptical/rust-gha-template

lib.rs:

Minimalist utilities for writing custom GitHub Actions.

No runtime deps