A tool to reproduce workflow runs on GitHub Actions
- Ubuntu 18.04 or higher
- Python 3.8
- Python3-virtualenv
- Docker
- GitHub personal access token (classic) with repo scope
-
Clone the repository
~$ git clone https://github.com/BugSwarm/actions-remaker ~$ cd actions-remaker
-
Create and activate a Python virtual environment
~/actions-remaker$ virtualenv -p python3.8 venv ~/actions-remaker$ . venv/bin/activate
-
Add personal access token to credentials
- Open
bugswarm/common/credentials.py
- Replace
GITHUB_TOKENS = []
withGITHUB_TOKENS = ['my_personal_token']
- Open
-
Install dependencies
(venv) ~/actions-remaker$ pip install -e .
- 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>
-
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
-
Reproduce just the failed job (original log).
(venv) ~/actions-remaker$ bash run.sh -r Grasscutters/Grasscutter -j 9179386809