hashFiles.yaml
This commit is contained in:
40
.github/workflows/hashFiles.yaml
vendored
Normal file
40
.github/workflows/hashFiles.yaml
vendored
Normal 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 }}
|
Reference in New Issue
Block a user