mirror of
https://gitea.com/actions/go-hashfiles.git
synced 2025-04-07 04:09:23 +07:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9dfd9b73c8 | ||
![]() |
7210d0df2f | ||
![]() |
3a787cd412 | ||
![]() |
74a259b75c |
16
README.md
16
README.md
@ -1,8 +1,10 @@
|
||||
# go-hashfiles
|
||||
|
||||
This action is to compute the SHA256 checksum of specified files.
|
||||
This action is to compute the SHA256 hash of specified files.
|
||||
|
||||
**NOTE:** This action is written in Go. Please make sure the `runs-on` runner supports running Go actions.
|
||||
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 setup the Go environment before running this action or use a runner with Go environment installed.
|
||||
|
||||
## Usage
|
||||
|
||||
@ -14,7 +16,7 @@ This action is to compute the SHA256 checksum of specified files.
|
||||
workdir: ''
|
||||
|
||||
# The patterns used to match files.
|
||||
# Multiple patterns should be seperated with `\n`
|
||||
# Multiple patterns should be seperated by `\n`
|
||||
patterns: ''
|
||||
```
|
||||
|
||||
@ -22,11 +24,16 @@ This action is to compute the SHA256 checksum of specified files.
|
||||
|
||||
|Output Item|Description|
|
||||
|---|---|
|
||||
|hash|The computed checksum|
|
||||
|hash|The computed hash result|
|
||||
|matched-files|The files matched by the patterns|
|
||||
|
||||
## Example
|
||||
``` 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
|
||||
id: get-hash
|
||||
with:
|
||||
@ -34,6 +41,7 @@ This action is to compute the SHA256 checksum of specified files.
|
||||
go.sum
|
||||
./admin/*
|
||||
**/package-lock.json
|
||||
|
||||
- name: Echo hash
|
||||
run: echo ${{ steps.get-hash.outputs.hash }}
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: 'Go HashFiles'
|
||||
description: 'Compute the SHA256 checksum of specified files'
|
||||
description: 'Compute the SHA256 hash of specified files'
|
||||
inputs:
|
||||
workdir:
|
||||
description: >
|
||||
@ -13,7 +13,7 @@ inputs:
|
||||
required: true
|
||||
outputs:
|
||||
hash:
|
||||
description: 'The computed checksum'
|
||||
description: 'The computed hash result'
|
||||
matched-files:
|
||||
description: 'The files matched by the patterns'
|
||||
runs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user