chore: run CI on up to date PRs (#9885)

This commit is contained in:
Nikolay Vitkov 2023-03-22 10:47:22 +01:00 committed by GitHub
parent 4f52a027ba
commit 8bd73175e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,10 @@ permissions: read-all
on:
workflow_call:
inputs:
check-mergeable-state:
default: false
type: boolean
outputs:
changes:
description: 'The packages that were changed for this PR'
@ -19,6 +23,11 @@ jobs:
uses: actions/checkout@v3.3.0
with:
fetch-depth: 2
- name: Check if branch is out of date
if: ${{ inputs.check-mergeable-state }}
run: |
git fetch origin main --depth 1 &&
git merge-base --is-ancestor origin/main @;
- name: Detect changed packages
uses: dorny/paths-filter@v2.11.1
id: changes

View File

@ -59,6 +59,8 @@ jobs:
check-changes:
needs: inspect-code
uses: ./.github/workflows/changed-packages.yml
with:
check-mergeable-state: true
deploy-docs:
needs: check-changes