mirror of
https://github.com/seepine/hash-files.git
synced 2024-10-16 07:43:19 +08:00
44dc1b971f
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.1.0 to 29.1.1. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.0...v29.1.1) --- updated-dependencies: - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
__tests__ | ||
.github | ||
.vscode | ||
dist | ||
src | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
action.yml | ||
CODEOWNERS | ||
jest.config.js | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json |
hash-files
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: seepine/hash-files@v1
with:
# The working dir for the action.
# Default: ${{ github.workspace }}
workdir: ''
# The patterns used to match files.
patterns: '**/package-lock.json'
# Multiple patterns should be seperated by `\n`
patterns: |
**/package-lock.json
**/yarn.lock
Input
Output Item | Description | Required | Default |
---|---|---|---|
workdir | The working dir for the action | false | ${{ github.workspace }} |
patterns | The patterns used to match files | true | |
gitignore | Respect ignore patterns in .gitignore files that apply to the globbed files. | false | true |
ignoreFiles | Glob patterns to look for ignore files, which are then used to ignore globbed files. | false |
Output
Output Item | Description |
---|---|
hash | The computed hash result |
matched-files | The files matched by the patterns |
Example
# Setup the Node environment. This step can be skipped if Node has been installed.
- uses: actions/setup-node@v3
- uses: seepine/hash-files@v1
id: get-hash
with:
patterns: |
**/package-lock.json
**/yarn.lock
- name: Echo hash
run: echo ${{ steps.get-hash.outputs.hash }}