From 97e3990e0379fb5e8c0ea01c9032ad56114cd78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Mon, 14 Oct 2024 11:19:40 +0800 Subject: [PATCH] hashFiles.yaml --- .github/workflows/hashFiles.yaml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/hashFiles.yaml diff --git a/.github/workflows/hashFiles.yaml b/.github/workflows/hashFiles.yaml new file mode 100644 index 0000000..5fc8190 --- /dev/null +++ b/.github/workflows/hashFiles.yaml @@ -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 }} \ No newline at end of file