hashFiles.yaml
Some checks failed
/ job1 (push) Successful in 8s
/ job2 (push) Successful in 7s
/ job3 (push) Has been skipped
/ go-hashfiles (push) Failing after 22s
/ hashFiles (push) Successful in 7s

This commit is contained in:
严浩
2024-10-14 11:19:40 +08:00
parent cc8625d890
commit 97e3990e03

40
.github/workflows/hashFiles.yaml vendored Normal file
View File

@ -0,0 +1,40 @@
# act --workflows .github/workflows/hashFiles.yaml --pull=false
on:
push:
branches: ["main"]
pull_request:
defaults:
run:
shell: bash
jobs:
hashFiles:
runs-on: ubuntu-latest
steps:
- name: hashFiles()
run: |
echo "START"
# https://github.com/nektos/act/issues/1012
echo "-${{ hashFiles('README.md') }}"
echo "-${{ hashFiles('**/*.yaml') }}"
echo "END"
go-hashfiles: # https://gitea.com/actions/go-hashfiles
runs-on: ubuntu-latest
steps:
# 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: https://gitea.com/actions/go-hashfiles
id: get-hash
with:
patterns: |-
go.sum
./admin/*
**/package-lock.json
README.md
- name: Echo hash
run: echo ${{ steps.get-hash.outputs.hash }}