Skip to content

Commit 21904a3

Browse files
ci(wasmcloud): convert to changed-files action
Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>
1 parent 361d71c commit 21904a3

File tree

1 file changed

+34
-29
lines changed

1 file changed

+34
-29
lines changed

.github/workflows/wasmcloud.yml

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -101,40 +101,45 @@ jobs:
101101
meta:
102102
runs-on: ubuntu-latest
103103
outputs:
104-
wasmcloud_modified: ${{ steps.changes.outputs.wasmcloud }}
105-
providers_modified: ${{ steps.changes.outputs.providers }}
104+
wasmcloud_modified: ${{ steps.wasmcloud_changes.outputs.any_changed }}
105+
providers_modified: ${{ steps.provider_changes.outputs.any_changed }}
106106
steps:
107107
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
108-
- uses: dorny/paths-filter@v3
109-
id: changes
108+
- uses: tj-actions/changed-files@7ac5902a02bbf88c426878d792c0728b55bb97ae
109+
id: wasmcloud_changes
110110
with:
111111
# Consider wasmCloud changed if any Rust file other than
112112
# capability providers change
113-
filters: |
114-
wasmcloud:
115-
- './.github/actions/build-nix/action.yml'
116-
- './.github/actions/install-nix/action.yml'
117-
- './.config/nextest.toml'
118-
- 'nix/images/default.nix'
119-
- 'flake.lock'
120-
- 'flake.nix'
121-
- 'Cargo.lock'
122-
- 'Cargo.toml'
123-
- 'rust-toolchain.toml'
124-
- 'crates/**/*'
125-
- 'crates/provider-sdk/*'
126-
- 'src/**/*'
127-
- 'tests/**/*'
128-
- 'wit/**/*'
129-
- '!crates/provider-*'
130-
- '!crates/wash-*/'
131-
- '!crates/**/*.md'
132-
- '!wit/**/*.md'
133-
providers:
134-
- 'Cargo.lock'
135-
- 'Cargo.toml'
136-
- 'crates/provider-*'
137-
- 'crates/provider-sdk/*'
113+
files: |
114+
./.github/actions/build-nix/action.yml
115+
./.github/actions/install-nix/action.yml
116+
./.config/nextest.toml
117+
nix/images/default.nix
118+
flake.lock
119+
flake.nix
120+
Cargo.lock
121+
Cargo.toml
122+
rust-toolchain.toml
123+
crates/**/*.{rs,toml,wit}
124+
src/**/*.{rs,toml,wit}
125+
tests/**/*.{rs,toml,wit}
126+
wit/**/*.wit
127+
# Somewhat naive assumption that providers will be under `crates/provider-<interface>-<vendor>`
128+
# as that is our naming convention for providers.
129+
files_ignore: |
130+
!crates/provider-*-*
131+
!crates/wash-*
132+
- uses: tj-actions/changed-files@7ac5902a02bbf88c426878d792c0728b55bb97ae
133+
id: provider_changes
134+
with:
135+
# Consider providers changed if any file in the providers change
136+
files: |
137+
Cargo.lock
138+
Cargo.toml
139+
crates/provider-*/*.{rs,toml,wit}
140+
files_ignore: |
141+
!crates/**/*.md
142+
138143
build-bin:
139144
needs: [meta]
140145
if: ${{ needs.meta.outputs.wasmcloud_modified == 'true' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/wash-cli-v')}}

0 commit comments

Comments
 (0)