Skip to content

Commit

Permalink
chore(ci): use changed files action (argoproj#17180)
Browse files Browse the repository at this point in the history
`dorny/paths-filter` doesn't seem to handle (multiple) negations well.
Therefore, this PR switches to `tj-actions/changed-files`, since it is
already successfully used in argo-workflows.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
  • Loading branch information
blakepettersson authored and lyda committed Mar 28, 2024
1 parent df4051a commit c79bb5f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,23 @@ jobs:
changes:
runs-on: ubuntu-latest
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
backend: ${{ steps.filter.outputs.backend_any_changed }}
frontend: ${{ steps.filter.outputs.frontend_any_changed }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2
- uses: tj-actions/changed-files@90a06d6ba9543371ab4df8eeca0be07ca6054959 # v42.0.2
id: filter
with:
# Any file which is not under docs/, ui/ or is not a markdown file is counted as a backend file
filters: |
files_yaml: |
backend:
- '!(ui/**|docs/**|**.md|**/*.md)'
- '!ui/**'
- '!**.md'
- '!**/*.md'
- '!docs/**'
frontend:
- 'ui/**'
- Dockerfile
check-go:
name: Ensure Go modules synchronicity
if: ${{ needs.changes.outputs.backend == 'true' }}
Expand All @@ -55,7 +59,7 @@ jobs:
- name: Download all Go modules
run: |
go mod download
- name: Check for tidyness of go.mod and go.sum
- name: Check for tidiness of go.mod and go.sum
run: |
go mod tidy
git diff --exit-code -- .
Expand Down

0 comments on commit c79bb5f

Please sign in to comment.