Skip to content

Pull (get it?) artifacts from GitHub action workflow

License

Notifications You must be signed in to change notification settings

Pistonite/magnesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magnesis

Pull (get it?) artifacts from GitHub action workflow for local testing

Originally part of the testing tool for celer, extracted for general use.

Install

cargo install magnesis --git https://github.com/Pistonite/magnesis

Usage

You first need a GitHub personal access token (PAT) with repo read permissions. See here This token is read from the environment variable GITHUB_TOKEN.

Download artifacts from a workflow ran on the current commit, in the current repository, and extract them to dist:

magnesis

See magnesis --help for more options.

Defaults

Output

You can change the output directory with -o:

magnesis -o output

Repository

By default, calls git remote get-url origin to get the repository URL, and parses it to get the owner and repository name if it's in the form http(s)://github.com/OWNER/REPO(.git) or [email protected]:OWNER/REPO(.git).

magnesis --repo foo/bar

If origin is not the remote to use or the URL is not in the expected format, you can specify the repository with the --repo flag (for example, when there are multiple remotes).

Commit

By default, calls git rev-parse HEAD to get the current commit. To use another commit, you can specify it with the --rev flag.

magnesis --rev foo

This will call git rev-parse foo to get the commit hash.

However, if foo already looks like a full commit hash, it will be used as-is. This is useful when downloading artifacts from another repo.

About

Pull (get it?) artifacts from GitHub action workflow

Resources

License

Stars

Watchers

Forks

Languages