You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9dfd9b73c8 | 2 years ago | |
---|---|---|
README.md | 2 years ago | |
action.yml | 2 years ago | |
go.mod | 2 years ago | |
go.sum | 2 years ago | |
main.go | 2 years ago |
README.md
go-hashfiles
This action is to compute the SHA256 hash of specified files.
The hash function is based on nektos/act. Thanks!
NOTE: This action is written in Go. Please setup the Go environment before running this action or use a runner with Go environment installed.
Usage
- uses: actions/go-hashfiles@v0.0.1
with:
# The working dir for the action.
# Default: ${{ github.workspace }}
workdir: ''
# The patterns used to match files.
# Multiple patterns should be seperated by `\n`
patterns: ''
Output
Output Item | Description |
---|---|
hash | The computed hash result |
matched-files | The files matched by the patterns |
Example
# Setup the Go environment. This step can be skipped if Go has been installed.
- uses: actions/setup-go@v3
with:
go-version: '1.20'
- uses: actions/go-hashfiles@v0.0.1
id: get-hash
with:
patterns: |-
go.sum
./admin/*
**/package-lock.json
- name: Echo hash
run: echo ${{ steps.get-hash.outputs.hash }}