#workflow #runner #automation #docker #ci

astro-runner

AstroRun is a highly customizable workflow orchestrator that allows users to define their own core runners. Whether it's Docker or other platforms, AstroRun empowers users to run workflows with ease and flexibility.

5 releases

new 0.1.4 Feb 24, 2024
0.1.3 Oct 1, 2023
0.1.2 Sep 1, 2023
0.1.1 Aug 23, 2023
0.1.0 Aug 17, 2023

#3 in #astrorun

Download history 2/week @ 2023-11-12 11/week @ 2023-11-19 15/week @ 2023-11-26 11/week @ 2023-12-03 4/week @ 2023-12-17 12/week @ 2023-12-24 18/week @ 2024-01-28 1/week @ 2024-02-04 19/week @ 2024-02-11 124/week @ 2024-02-18

162 downloads per month

MIT license

145KB
4.5K SLoC

Astro Runner

astro-run-runner is a specific runner implementation within astro-run. It supports running the smallest execution unit of workflow steps in both local and Dockerfile environments.

It can also be used in conjunction with other components of the astro-run ecosystem, such as astro-run-server and astro-run-remote-runner.

Example

Add astro-run and astro-runner as dependencies in your Cargo.toml:

[dependencies]
astro-run = "0.1"
astro-runner = "0.1"

Code Example

use astro_run::{AstroRun, Workflow};
use astro_runner::AstroRunner;

#[tokio::main]
#[ignore]
async fn main() {
  let workflow = r#"
jobs:
  test:
    name: Test Job
    steps:
      - timeout: 60m
        continue-on-error: false
        run: echo "Hello World" >> test.txt
      - run: |
          content=$(cat test.txt)
          echo Content is $content
          echo "Cache" >> /home/work/caches/test.txt
  "#;
  let runner = AstroRunner::builder().build().unwrap();

  let astro_run = AstroRun::builder().runner(runner).build();

  let workflow = Workflow::builder()
    .config(workflow)
    .build(&astro_run)
    .unwrap();

  let ctx = astro_run.execution_context().build();

  let _res = workflow.run(ctx).await;
}

Dependencies

~15–29MB
~553K SLoC