Skip to content

Commit

Permalink
Run os-compat workflow on dependabot updates to the workflow
Browse files Browse the repository at this point in the history
We recently saw CI miss some failures because this workflow was skipped
on a dependabot update that updates the workflow file itself.

This also fixes GitHub actions to skip this build in the merge queue if
it was skipped on CI.
  • Loading branch information
wadells committed Dec 28, 2023
1 parent 20dc4d6 commit 7faf32e
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/os-compatibility-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,35 @@ name: OS Compatibility Test
run-name: OS Compatibility Test
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'web/**'
- 'rfd/**'
- '**/*.md*'
merge_group:
paths-ignore:
- 'docs/**'
- 'web/**'
- 'rfd/**'
- '**/*.md*'

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
this-workflow: ${{ steps.changes.outputs.this-workflow }}
binary-sources: ${{ steps.changes.outputs.binary-sources }}
steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
with:
filters: |
this-workflow:
- '.github/workflows/os-compatibility-test.yaml'
binary-sources:
- '**/*.c'
- '**/*.go'
- '**/go.mod'
- '**/go.sum'
- '**/Makefile'
- '**/*.mk'
build:
name: OS Compatibility Build
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
needs: changes
if: ${{ needs.changes.outputs.this-workflow == 'true' || (needs.changes.outputs.binary-sources == 'true' && !startsWith(github.head_ref, 'dependabot/')) }}
runs-on: ubuntu-22.04-16core

permissions:
Expand Down

0 comments on commit 7faf32e

Please sign in to comment.