mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
ci: fix visual-regression report comments (#46366)
This commit is contained in:
parent
7937302012
commit
eb166f7902
@ -90,7 +90,8 @@ jobs:
|
||||
ALI_OSS_AK_SECRET: ${{ secrets.ALI_OSS_AK_SECRET }}
|
||||
ALI_OSS_BUCKET: ${{ secrets.ALI_OSS_BUCKET }}
|
||||
run: |
|
||||
tar -xzvf visualRegressionReport.tar.gz
|
||||
mkdir ./visualRegressionReport
|
||||
tar -xzvf visualRegressionReport.tar.gz -C ./visualRegressionReport
|
||||
echo "✅ Uncompress Finished"
|
||||
|
||||
rm package.json
|
||||
@ -114,7 +115,7 @@ jobs:
|
||||
${{ steps.report.outputs.content }}
|
||||
<!-- VISUAL_DIFF_REGRESSION_HOOK -->
|
||||
body-include: '<!-- VISUAL_DIFF_REGRESSION_HOOK -->'
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
number: ${{ steps.report.outputs.id }}
|
||||
|
||||
- name: failed comment
|
||||
if: ${{ fromJSON(needs.upstream-workflow-summary.outputs.build-failure) || steps.report.outcome == 'failure' || failure() }}
|
||||
@ -126,4 +127,4 @@ jobs:
|
||||
😔 📉 📊 ❌ 🚫
|
||||
<!-- VISUAL_DIFF_REGRESSION_HOOK -->
|
||||
body-include: '<!-- VISUAL_DIFF_REGRESSION_HOOK -->'
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
number: ${{ steps.report.outputs.id }}
|
||||
|
@ -91,6 +91,7 @@ async function downloadBaseSnapshots(ref: string, targetDir: string) {
|
||||
await downloadFile(imageSnapshotsUrl, targzPath);
|
||||
// untar
|
||||
return tar.x({
|
||||
// remove top-level dir
|
||||
strip: 1,
|
||||
C: targetDir,
|
||||
file: targzPath,
|
||||
@ -167,7 +168,7 @@ async function boot() {
|
||||
await fse.ensureDir(baseImgReportDir);
|
||||
await fse.ensureDir(currentImgReportDir);
|
||||
|
||||
console.log(chalk.blue('⛳ Checking image snapshots with branch `master`'));
|
||||
console.log(chalk.blue('⛳ Checking image snapshots with branch %s'), targetBranch);
|
||||
console.log('\n');
|
||||
|
||||
const baseImgFileList = readPngs(baseImgSourceDir);
|
||||
@ -238,6 +239,7 @@ async function boot() {
|
||||
await tar.c(
|
||||
{
|
||||
gzip: true,
|
||||
// ignore top-level dir(e.g. visualRegressionReport) and zip all files in it
|
||||
cwd: reportDir,
|
||||
file: `${path.basename(reportDir)}.tar.gz`,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user