Skip to content

BugSwarm/actions-remaker

Repository files navigation

ActionsRemaker

A tool to reproduce workflow runs on GitHub Actions

ActionsRemaker

Setting up

Requirements

Installation

  1. Clone the repository

    ~$ git clone https://github.com/BugSwarm/actions-remaker
    ~$ cd actions-remaker
  2. Create and activate a Python virtual environment

    ~/actions-remaker$ virtualenv -p python3.8 venv
    ~/actions-remaker$ . venv/bin/activate
  3. Add personal access token to credentials

    • Open bugswarm/common/credentials.py
    • Replace GITHUB_TOKENS = [] with GITHUB_TOKENS = ['my_personal_token']
  4. Install dependencies

    (venv) ~/actions-remaker$ pip install -e .

Usage

Commands

  • Get job ID from GitHub's website
    get_id.sh <github-url>
  • Reproduce a single run with job ID
    run.sh -r <repo-slug> -j <job-id>
  • Reproduce a fail-pass pair
    run.sh -r <repo-slug> -f <failed-job-id> -p <passed-job-id>

Examples

  1. Reproduce a failed job (original log) and a passed job (original log).

    Get failed job ID and passed job ID:

    (venv) ~/actions-remaker$ bash get_id.sh https://github.com/Grasscutters/Grasscutter/actions/runs/3344953329
    (venv) ~/actions-remaker$ bash get_id.sh https://github.com/Grasscutters/Grasscutter/actions/runs/3351485580

    Reproduce failed and passed jobs:

    (venv) ~/actions-remaker$ bash run.sh -r Grasscutters/Grasscutter -f 9179386809 -p 9179402125

    View reproduced failed job log:

    (venv) ~/actions-remaker$ cat reproducer/output/tasks/task/Grasscutters/Grasscutter/-1-3344953329-3351485580/9179386809-9179402125/9179386809.log

    View reproduced passed job log:

    (venv) ~/actions-remaker$ cat reproducer/output/tasks/task/Grasscutters/Grasscutter/-1-3344953329-3351485580/9179386809-9179402125/9179402125.log

    Check newly generated Docker images:

    (venv) ~/actions-remaker$ docker image ls
    REPOSITORY                         TAG                                       IMAGE ID       CREATED              SIZE
    job_id                             9179402125                                c9421d72ee0e   About a minute ago   11.6GB
    job_id                             9179386809                                086391da557b   About a minute ago   11.6GB
  2. Reproduce just the failed job (original log).

    (venv) ~/actions-remaker$ bash run.sh -r Grasscutters/Grasscutter -j 9179386809

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published