# This file fires for the same events as `on-pr.yml`,
# except where `on-pr.yml` skips over changes in paths-ignore,
# this event fires on the inverse.
# This is an officially blessed pattern for handling skipped but
# required status checks. See
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
# for more information.
name: Pull Request

on:
  pull_request:
    paths-ignore:
      - "**" # Skip all files…
      - "!sdk/.version" # …except if only this file changes and nothing else.
jobs:
  no-op:
    name: Skip CI on .version changes
    runs-on: ubuntu-latest
    steps:
      - name: Skip CI on .version changes
        run: echo 'No need to run CI tests when only .version changes'

  ci-ok:
    name: ci-ok
    runs-on: ubuntu-latest
    steps:
      - name: CI succeeded
        run: exit 0