mirror of
https://gitea.com/actions/go-hashfiles.git
synced 2025-04-19 10:04:14 +07:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
264ae76b7e |
16
README.md
16
README.md
@ -1,10 +1,8 @@
|
|||||||
# go-hashfiles
|
# go-hashfiles
|
||||||
|
|
||||||
This action is to compute the SHA256 hash of specified files.
|
This action is to compute the SHA256 checksum of specified files.
|
||||||
|
|
||||||
The hash function is based on [nektos/act](https://github.com/nektos/act/blob/ac5dd8feb876d37ae483376a137c57383577dace/pkg/exprparser/functions.go#L183). Thanks!
|
**NOTE:** This action is written in Go. Please make sure the `runs-on` runner supports running Go actions.
|
||||||
|
|
||||||
**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
|
## Usage
|
||||||
|
|
||||||
@ -16,7 +14,7 @@ The hash function is based on [nektos/act](https://github.com/nektos/act/blob/ac
|
|||||||
workdir: ''
|
workdir: ''
|
||||||
|
|
||||||
# The patterns used to match files.
|
# The patterns used to match files.
|
||||||
# Multiple patterns should be seperated by `\n`
|
# Multiple patterns should be seperated with `\n`
|
||||||
patterns: ''
|
patterns: ''
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -24,16 +22,11 @@ The hash function is based on [nektos/act](https://github.com/nektos/act/blob/ac
|
|||||||
|
|
||||||
|Output Item|Description|
|
|Output Item|Description|
|
||||||
|---|---|
|
|---|---|
|
||||||
|hash|The computed hash result|
|
|hash|The computed checksum|
|
||||||
|matched-files|The files matched by the patterns|
|
|matched-files|The files matched by the patterns|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
``` yml
|
``` yml
|
||||||
# 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
|
- uses: actions/go-hashfiles@v0.0.1
|
||||||
id: get-hash
|
id: get-hash
|
||||||
with:
|
with:
|
||||||
@ -41,7 +34,6 @@ The hash function is based on [nektos/act](https://github.com/nektos/act/blob/ac
|
|||||||
go.sum
|
go.sum
|
||||||
./admin/*
|
./admin/*
|
||||||
**/package-lock.json
|
**/package-lock.json
|
||||||
|
|
||||||
- name: Echo hash
|
- name: Echo hash
|
||||||
run: echo ${{ steps.get-hash.outputs.hash }}
|
run: echo ${{ steps.get-hash.outputs.hash }}
|
||||||
```
|
```
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: 'Go HashFiles'
|
name: 'Go HashFiles'
|
||||||
description: 'Compute the SHA256 hash of specified files'
|
description: 'Compute the SHA256 checksum of specified files'
|
||||||
inputs:
|
inputs:
|
||||||
workdir:
|
workdir:
|
||||||
description: >
|
description: >
|
||||||
@ -13,7 +13,7 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
outputs:
|
outputs:
|
||||||
hash:
|
hash:
|
||||||
description: 'The computed hash result'
|
description: 'The computed checksum'
|
||||||
matched-files:
|
matched-files:
|
||||||
description: 'The files matched by the patterns'
|
description: 'The files matched by the patterns'
|
||||||
runs:
|
runs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user