Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

aweris/ghx

Repository files navigation

GitHub Actions Executor

DEPRECATED: This project is deprecated. It moved back to aweris/gale/tools/ghx as a sub project.

The GitHub Actions Executor is a helper command for running GitHub Actions from inside of Dagger containers.

Warning: This project is still in early development and is not ready for use. Warning: This project intended to used with the project gale in Dagger containers

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

Installation

go get github.com/aweris/ghx

Usage

Github Actions Executor is a helper tool for gale to run workflows locally

Usage:
  ghx [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  run         Runs all configured steps
  version     Print version information
  with        Adds new configuration to execute

Flags:
  -h, --help   help for ghx

Use "ghx [command] --help" for more information about a command.

Adding job to run:

ghx with job --workflow .github/workflows/test.yml --job test

help for job:

Sets workflow and job environment variables and configures to all steps in the job.

Usage:
  ghx with job [flags]

Flags:
  -h, --help              help for job
      --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

Adding step to run:

ghx with step --uses actions/checkout@v3 --name checkout --with token=<token> --with ref=master

help for step:

Add new step to execute

Usage:
  ghx with step [flags]

Flags:
      --env stringToString    Environment variable names and values (default [])
  -h, --help                  help for step
      --id string             Unique identifier of the step
      --name string           Name of the step
      --override              Override step if already exists
      --run string            Command to run for the step
      --shell string          Shell to use for the step
      --uses string           Action to run for the step
      --with stringToString   Input names and values for the step (default [])

Running configured steps:

ghx run