Chore: Make detect breaking changes workflow backport compatible (#45005)

* fix(detect-breaking-changes): use the base.ref for backport compatibility

* chore(check-breaking-changes): update path to previous package dist directory
This commit is contained in:
Jack Westbrook 2022-02-08 11:33:33 +01:00 committed by GitHub
parent ffee50b57c
commit f885c2ede9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -43,18 +43,18 @@ jobs:
name: buildPr
path: './pr/pr_built_packages.zip'
buildMain:
name: Build Main
buildBase:
name: Build Base
runs-on: ubuntu-latest
defaults:
run:
working-directory: './main'
working-directory: './base'
steps:
- uses: actions/checkout@v2
with:
path: './main'
ref: 'main'
path: './base'
ref: ${{ github.event.pull_request.base.ref }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
@ -76,18 +76,18 @@ jobs:
run: yarn packages:build
- name: Zip built packages
run: zip -r ./main_built_packages.zip ./packages/**/dist
run: zip -r ./base_built_packages.zip ./packages/**/dist
- name: Upload build output as artifact
uses: actions/upload-artifact@v2
with:
name: buildMain
path: './main/main_built_packages.zip'
name: buildBase
path: './base/base_built_packages.zip'
Detect:
name: Detect breaking changes
runs-on: ubuntu-latest
needs: ['buildPR', 'buildMain']
needs: ['buildPR', 'buildBase']
env:
GITHUB_STEP_NUMBER: 7
@ -99,16 +99,16 @@ jobs:
with:
name: buildPr
- name: Get built packages from main
- name: Get built packages from base
uses: actions/download-artifact@v2
with:
name: buildMain
name: buildBase
- name: Unzip artifact from pr
run: unzip pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
- name: Unzip artifact from main
run: unzip main_built_packages.zip -d ./main && rm main_built_packages.zip
- name: Unzip artifact from base
run: unzip base_built_packages.zip -d ./base && rm base_built_packages.zip
- name: Get link for the Github Action job
id: job

View File

@ -12,7 +12,7 @@ while IFS=" " read -r -a package; do
PACKAGE_PATH=$(basename "$package")
# Calculate current and previous package paths / names
PREV="./main/packages/$PACKAGE_PATH/dist/"
PREV="./base/packages/$PACKAGE_PATH/dist/"
CURRENT="./pr/packages/$PACKAGE_PATH/dist/"
# Temporarily skipping these packages as they don't have any exposed static typing