From d5a1931211195c59af7ac7e767f20d08ad6e5183 Mon Sep 17 00:00:00 2001 From: fewensa <37804932+fewensa@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:13:14 +0000 Subject: [PATCH] add phrase --- actions/smart-vercel/action.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/actions/smart-vercel/action.yml b/actions/smart-vercel/action.yml index 472d88a..f01cd05 100644 --- a/actions/smart-vercel/action.yml +++ b/actions/smart-vercel/action.yml @@ -55,6 +55,9 @@ inputs: preview_output: description: 'Output preview markdown' required: false + preview_section: + description: 'Oytput preview section name' + required: false prod_mode: description: 'Production mode' required: false @@ -174,6 +177,7 @@ runs: VERCEL_TOKEN=${{ inputs.vercel_token }} VERCEL_GROUP=${{ inputs.vercel_group }} PREVIEW_OUTPUT=${{ inputs.preview_output }} + PREVIEW_SECTION=${{ inputs.preview_section }} PROD_MODE=${{ inputs.prod_mode }} DIST_PATH=${{ inputs.dist_path }} PATH_VERCEL_JSON=${{ inputs.vercel_json_path }} @@ -251,7 +255,11 @@ runs: COMMIT="Commit: [${SHA}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${SHA})" PREVIEW="Preview: ${PREVIEW_LINK}" - echo '\---' >> comment.md + if [ -n "${PREVIEW_SECTION}" ]; then + echo "\---${PREVIEW_SECTION}---" >> comment.md + else + echo '\---' >> comment.md + fi echo $COMMIT >> comment.md echo $PREVIEW >> comment.md echo '' >> comment.md