From be63d9b77a520995b58d22e4f337e35d8d9a19d9 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Tue, 27 Aug 2024 18:26:42 +0200 Subject: [PATCH] ci: Migrate to paths-filter The technote-space/get-diff-action repo is no longer maintained and archived. Last commit was 2 years ago. On the other hand dorny/paths-filter is actively maintained, last commit was 6 months ago and has far more stars 2100 vs 190 for get-diff-action. Last but not least paths-filter would better handle push force scenario. Also bump actions versions to keep the CI up to date. --- .github/workflows/build.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f0dd70a2..4a9d10ae7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,21 +21,23 @@ jobs: matrix: go-arch: ["amd64"] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "^1.21" - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff + - uses: dorny/paths-filter@v3 + id: filter with: - PATTERNS: | - **/*.go - go.mod - go.sum - **/go.mod - **/go.sum - **/Makefile - Makefile + filters: | + go: + - '**/*.go' + - 'go.mod' + - 'go.sum' + - '**/go.mod' + - '**/go.sum' + - '**/Makefile' + - 'Makefile' + - name: Build - if: env.GIT_DIFF + if: steps.filter.outputs.go == 'true' run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build