Files
act-runner-example/.github/workflows/hashFiles.yaml
严浩 56621f5817
All checks were successful
/ job3 (push) Has been skipped
/ job2 (push) Successful in 6s
/ job1 (push) Successful in 8s
/ hashFiles (push) Successful in 7s
/ go-hashfiles (push) Successful in 22s
hashFiles.yaml
2024-10-14 11:25:00 +08:00

41 lines
1.0 KiB
YAML

# 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:
- uses: actions/checkout@main
# 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@main
id: get-hash
with:
patterns: |-
go.sum
./admin/*
**/package-lock.json
README.md
- name: Echo hash
run: echo ${{ steps.get-hash.outputs.hash }}