mirror of
https://github.com/grafana/grafana.git
synced 2025-09-20 12:40:46 +08:00
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:
@ -43,18 +43,18 @@ jobs:
|
|||||||
name: buildPr
|
name: buildPr
|
||||||
path: './pr/pr_built_packages.zip'
|
path: './pr/pr_built_packages.zip'
|
||||||
|
|
||||||
buildMain:
|
buildBase:
|
||||||
name: Build Main
|
name: Build Base
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: './main'
|
working-directory: './base'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: './main'
|
path: './base'
|
||||||
ref: 'main'
|
ref: ${{ github.event.pull_request.base.ref }}
|
||||||
|
|
||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
@ -76,18 +76,18 @@ jobs:
|
|||||||
run: yarn packages:build
|
run: yarn packages:build
|
||||||
|
|
||||||
- name: Zip built packages
|
- 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
|
- name: Upload build output as artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: buildMain
|
name: buildBase
|
||||||
path: './main/main_built_packages.zip'
|
path: './base/base_built_packages.zip'
|
||||||
|
|
||||||
Detect:
|
Detect:
|
||||||
name: Detect breaking changes
|
name: Detect breaking changes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: ['buildPR', 'buildMain']
|
needs: ['buildPR', 'buildBase']
|
||||||
env:
|
env:
|
||||||
GITHUB_STEP_NUMBER: 7
|
GITHUB_STEP_NUMBER: 7
|
||||||
|
|
||||||
@ -99,16 +99,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: buildPr
|
name: buildPr
|
||||||
|
|
||||||
- name: Get built packages from main
|
- name: Get built packages from base
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: buildMain
|
name: buildBase
|
||||||
|
|
||||||
- name: Unzip artifact from pr
|
- name: Unzip artifact from pr
|
||||||
run: unzip pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
|
run: unzip pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
|
||||||
|
|
||||||
- name: Unzip artifact from main
|
- name: Unzip artifact from base
|
||||||
run: unzip main_built_packages.zip -d ./main && rm main_built_packages.zip
|
run: unzip base_built_packages.zip -d ./base && rm base_built_packages.zip
|
||||||
|
|
||||||
- name: Get link for the Github Action job
|
- name: Get link for the Github Action job
|
||||||
id: job
|
id: job
|
||||||
|
@ -12,7 +12,7 @@ while IFS=" " read -r -a package; do
|
|||||||
PACKAGE_PATH=$(basename "$package")
|
PACKAGE_PATH=$(basename "$package")
|
||||||
|
|
||||||
# Calculate current and previous package paths / names
|
# 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/"
|
CURRENT="./pr/packages/$PACKAGE_PATH/dist/"
|
||||||
|
|
||||||
# Temporarily skipping these packages as they don't have any exposed static typing
|
# Temporarily skipping these packages as they don't have any exposed static typing
|
||||||
|
Reference in New Issue
Block a user