Skip required check if it's not applicable in github actions

Viewed 764

I have a GitHub workflow that applies to only certain events:

on:
  pull_request:
    paths:
      - 'foo/**'
  push:
    paths:
      - 'foo/**'

I want this workflow check to be required, but when those events do not occur then the build is stalled - it waits for a check that does not start.

How I can make this check required, yet skipped when it's not triggered?

1 Answers
Related