Code Monkey home page Code Monkey logo

gale's Introduction

GitHub Action Local Executor

The GitHub Action Local Executor, or gale for short, is a powerful tool that enables the execution of GitHub Actions locally using Dagger.

Warning: This project is still in early development and is not ready for use. Warning: This project currently relies on gh for authentication. The github cli must be installed and authenticated.

Features

  • Execute GitHub Actions locally
  • Test and Debug GitHub Actions locally without pushing to GitHub
  • List previous runs of a workflow and access their logs, artifacts, and metadata

TODO

  • Support for custom actions using node
  • Support for bash scripts in run steps
  • Support for docker:// actions
  • Support for github expressions, e.g. ${{ github.ref }}
  • Support for secrets
  • Support for triggers and events
  • Support for composite actions
  • Support for reusable workflows
  • Add Default environment variables

**including list from aweris/ghx as well

Installation

go get github.com/aweris/gale

Usage

As a CLI

Usage:

Usage:
  gale [flags]

Flags:
      --export            Export the runner directory after the execution. Exported directory will be placed under .gale directory in the current directory.
  -h, --help              help for gale
      --job string        Name of the job
      --workflow string   Name of the workflow. If workflow doesn't have name, than it must be relative path to the workflow file

Run:

gale --workflow=.github/workflows/clone.yaml --job=clone --export

The above command will execute the clone job in the workflow .github/workflows/clone.yaml and export the runner directory to .gale/<timestamp> directory.

As a library

result, err := gale.New(client).
                WithGithubContext(githubCtx).
                WithJob(".github/workflows/clone.yaml", "clone").
                WithStep(&model.Step{ID: "0", Uses: "actions/checkout@v3", With: map[string]string{"token": jrc.Github.Token}}, true). // override checkout step
                Exec(ctx)

The above code will will do same thing as the CLI command above with one difference. It will override the checkout step with the one provided in the WithStep method.

gale's People

Contributors

aweris avatar samalba avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.