From 41bc8fc48b55ebb37b3156dfaaf4d8af46870392 Mon Sep 17 00:00:00 2001 From: Andrei Paikin Date: Wed, 20 Jan 2021 18:41:02 +0300 Subject: [PATCH] Issue #9177: add label for diff report from PR description --- .github/workflows/diff_report.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/diff_report.yml b/.github/workflows/diff_report.yml index fd64a88718d..d8e94bc2a23 100644 --- a/.github/workflows/diff_report.yml +++ b/.github/workflows/diff_report.yml @@ -31,6 +31,7 @@ jobs: config_link: ${{ steps.parse.outputs.config_link }} new_module_config_link: ${{ steps.parse.outputs.new_module_config_link }} patch_config_link: ${{ steps.parse.outputs.patch_config_link }} + report_label: ${{ steps.parse.outputs.report_label }} user: ${{ steps.branch.outputs.user }} branch: ${{ steps.branch.outputs.ref }} @@ -69,7 +70,11 @@ jobs: grep "^Diff Regression patch config:" text | cat > temp sed 's/Diff Regression patch config: //' temp > patch_config_link echo ::set-output name=patch_config_link::$(cat patch_config_link) - + + grep "^Report label:" text | cat > temp + sed 's/Report label: //' temp > report_label + echo ::set-output name=report_label::$(cat report_label) + - name: Set branch and username id: branch run: | @@ -180,8 +185,11 @@ jobs: DIFF="./contribution/checkstyle-tester/reports/diff" LINK="https://${{env.AWS_BUCKET_NAME}}.s3.${{env.AWS_REGION}}.amazonaws.com" aws s3 cp $DIFF s3://${{env.AWS_BUCKET_NAME}}/$FOLDER/reports/diff/ --recursive - echo $LINK/$FOLDER/reports/diff/index.html > message - + if [ ! -z "${{needs.parse_body.outputs.report_label}}" ]; then + echo "${{needs.parse_body.outputs.report_label}}: " > message + fi + echo $LINK/$FOLDER/reports/diff/index.html >> message + - name: Set output id: out run: echo ::set-output name=message::$(cat message)