chore: extract Changed packages workflow (#9741)

This commit is contained in:
Nikolay Vitkov 2023-02-23 16:37:36 +01:00 committed by GitHub
parent ba5d4bf2c1
commit 415da92300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 54 deletions

44
.github/workflows/changed-packages.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Check which packages changed
permissions: read-all
on:
workflow_call:
outputs:
changes:
description: 'The packages that were changed for this PR'
value: ${{ jobs.check-changes.outputs.changes }}
jobs:
check-changes:
name: Check which packages changed
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.changes }}
steps:
- name: Check out repository
uses: actions/checkout@v3.3.0
with:
fetch-depth: 2
- name: Detect changed packages
uses: dorny/paths-filter@v2.11.1
id: changes
with:
filters: |
puppeteer:
- '.github/workflows/ci.yml'
- 'packages/puppeteer/**'
- 'packages/puppeteer-core/**'
- 'docker/**'
- 'test/**'
- 'test-d/**'
- 'tools/mochaRunner/**'
website:
- '.github/workflows/ci.yml'
- 'docs/**'
- 'website/**'
ng-schematics:
- '.github/workflows/ci.yml'
- 'packages/ng-schematics/**'
browsers:
- '.github/workflows/ci.yml'
- 'packages/browsers/**'

View File

@ -55,38 +55,7 @@ jobs:
rm $diff_file
check-changes:
name: Check which packages changed
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.changes }}
steps:
- name: Check out repository
uses: actions/checkout@v3.3.0
with:
fetch-depth: 2
- name: Detect changed packages
uses: dorny/paths-filter@v2.11.1
id: changes
with:
filters: |
puppeteer:
- '.github/workflows/ci.yml'
- 'packages/puppeteer/**'
- 'packages/puppeteer-core/**'
- 'docker/**'
- 'test/**'
- 'test-d/**'
- 'tools/mochaRunner/**'
website:
- '.github/workflows/ci.yml'
- 'docs/**'
- 'website/**'
ng-schematics:
- '.github/workflows/ci.yml'
- 'packages/ng-schematics/**'
browsers:
- '.github/workflows/ci.yml'
- 'packages/browsers/**'
uses: ./.github/workflows/changed-packages.yml
deploy-docs:
needs: check-changes

View File

@ -1,5 +1,7 @@
name: Pre-release
permissions: read-all
on:
push:
branches:
@ -7,28 +9,7 @@ on:
jobs:
check-changes:
name: Check which packages changed
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.changes }}
steps:
- name: Check out repository
uses: actions/checkout@v3.3.0
with:
fetch-depth: 2
- name: Detect changed packages
uses: dorny/paths-filter@v2.11.1
id: changes
with:
filters: |
puppeteer:
- '.github/workflows/ci.yml'
- 'packages/puppeteer/**'
- 'packages/puppeteer-core/**'
- 'docker/**'
- 'test/**'
- 'test-d/**'
- 'tools/mochaRunner/**'
uses: ./.github/workflows/changed-packages.yml
pre-release:
if: |

View File

@ -1,5 +1,7 @@
name: Publish
permissions: read-all
on:
workflow_dispatch:
push: