Skip to content

Commit dace1ee

Browse files
committed
fix: Skip entire job instead of steps for platform filter
1 parent 9fd9d3f commit dace1ee

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,13 @@ jobs:
4242

4343
runs-on: ${{ matrix.os }}
4444

45+
# Skip entire job if platform doesn't match (workflow_dispatch only)
46+
if: |
47+
github.event_name == 'push' ||
48+
github.event.inputs.platform == 'all' ||
49+
github.event.inputs.platform == matrix.name
50+
4551
steps:
46-
- name: Check platform filter
47-
id: filter
48-
shell: bash
49-
run: |
50-
if [[ "${{ github.event_name }}" == "push" ]] || \
51-
[[ "${{ github.event.inputs.platform }}" == "all" ]] || \
52-
[[ "${{ github.event.inputs.platform }}" == "${{ matrix.name }}" ]]; then
53-
echo "skip=false" >> $GITHUB_OUTPUT
54-
else
55-
echo "skip=true" >> $GITHUB_OUTPUT
56-
fi
57-
5852
- name: Checkout
5953
if: steps.filter.outputs.skip == 'false'
6054
uses: actions/checkout@v4

0 commit comments

Comments
 (0)