From 181186d7f233166436f512e8c6c0b35e24b7e014 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 | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f0dd70a2..a3531219a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,8 @@ on: - main - release/** - upgrade/** + # TODO: debugging + - feature/paths-filter permissions: contents: read @@ -21,21 +23,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 - run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build + if: steps.filter.outputs.go == 'true' + run: debugging GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build