Skip to content

tailcallhq/rust-gh-workflows

Repository files navigation

🦀 [WIP] Rust GitHub Actions Workflows 🚀

Rust Build Status License: MIT Crates.io Contributors GitHub forks Stars Issues Discord

🧑‍💻 What is Rust GitHub Workflows?

Rust GitHub Workflows is a library that allows developers to write GitHub Actions in Rust, empowering you to automate, manage, and improve your CI/CD pipelines in a type-safe manner.

GitHub Actions is powerful, but writing workflows can sometimes feel repetitive or tricky. That's where Rust GitHub Workflows steps in! 🦾

  • 🔥 Rust-Powered: Leverage the performance and memory safety of Rust for writing workflows.
  • 🧩 Modular & Reusable: Build workflows in a reusable, maintainable way.
  • 📦 Crate-friendly: Seamless integration with your existing Rust projects.
  • 🌍 Cross-platform: Target multiple operating systems and environments.

🚀 Features

  • Rust-based GitHub Actions: Create workflows and custom actions in Rust.
  • Strong typing: Eliminate YAML errors with Rust's type safety.
  • Easy setup: Get started quickly with minimal setup required.
  • Expandability: Create your own actions in rust and use them as a cargo dependency.

📦 Installation

To use Rust GitHub Workflows in your project, add it to your Cargo.toml:

[dev-dependencies]
rust-gh-workflows = "1"

Then you can start creating GitHub Actions in your build.rs with Rust like this:

use rust_gh_workflows::{Workflow, Job};

fn main() {
    let workflow = Workflow::new("CI")
        .job(
            Job::new("build")
                .runs_on("ubuntu-latest")
                .steps(vec![
                    "checkout",
                    "setup-rust",
                    "cargo build --release"
                ]),
        );

    let yml = std:: workflow.generate();
    std::fs::write(".github/workflows/ci.yml", yml).expect("Unable to write file");

🛠️ Roadmap

  • Github Actions Type System and Operators
  • Custom action library support
  • Documentation improvements

💡 Why Rust?

Rust provides the perfect combination of speed, safety, and flexibility, making it an ideal choice for writing GitHub Actions. With Rust, you get strong typing, memory safety, and the ability to reuse existing code, which can make your automation scripts more robust and maintainable.

📄 License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

🙌 Contributors

A big thank you to all the contributors who helped make this project a success! 🙏

Contributors

🌟 Show Your Support

If you like this project, please consider giving it a ⭐ on GitHub and share it with the community!

🔗 Inspiration

This project was inspired by the following repositories:


Happy automating with Rust! 🦀❤️

About

Write your github workflows in rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages