| Crates.io | actions-digest |
| lib.rs | actions-digest |
| version | 0.2.2 |
| created_at | 2021-12-17 08:52:19.423093+00 |
| updated_at | 2022-03-02 09:36:20.842379+00 |
| description | Resolve GitHub Action steps from git-ref to commit-sha |
| homepage | |
| repository | |
| max_upload_size | |
| id | 499597 |
| size | 68,037 |
A command-line utility to resolve GitHub Action steps from git-ref actions/checkout@v2 to commit-sha actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579, written in Rust.
Using the commit SHA of a released action version is the safest for stability and security.
Source: GitHub Documentation
Please mind that
actions-digestis in its infancy and very limited. Once run, it can currently not update the workflow files with newer versions of the steps it first digested.
By default, actions-digest will write the data to stdout and its logs to stderr:
actions-digest workflow.yaml
To replace the workflow file in-place:
actions-digest workflow.yaml | sponge workflow.yaml
sponge is part of moreutils. It soaks up standard input to write it to a file.
If you want to keep a resolve log, write stderr to a file like so:
actions-digest workflow.yaml 2> workflow.yaml.log | sponge workflow.yaml
To avoid running into GitHub API rate-limiting quickly, use a Personal Access Token (PAT):
export GITHUB_TOKEN=<PAT>
# or use -t|--github-token
actions-digest --github-token <PAT> workflow.yaml
Actions digest is written in Rust. If you have its toolchain installed, you can run this command to install:
cargo install actions-digest
cargo install --git 'https://github.com/hendrikmaus/actions-digest' --branch main
To uninstall, use cargo uninstall <name>.
This project is released under the terms of the MIT license.