From 0d25192af2401d805977d48c7ece98e462c10af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Sat, 30 Nov 2024 10:26:35 +0100 Subject: [PATCH] Made the workflow callable --- .github/workflows/preview_comment.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview_comment.yaml b/.github/workflows/preview_comment.yaml index 6ce2fba10b..015aa30f48 100644 --- a/.github/workflows/preview_comment.yaml +++ b/.github/workflows/preview_comment.yaml @@ -4,6 +4,13 @@ on: pull_request: paths: - 'docs/**.md' + workflow_call: + inputs: + project: + description: 'The project to build (dev doc, user doc)' + default: '' + required: false + type: string jobs: post-preview-links: @@ -22,7 +29,7 @@ jobs: run: | set -x #debug file_limit=100 - build_url="https://ez-systems-developer-documentation--${{ github.event.pull_request.number }}.com.readthedocs.build/en/${{ github.event.pull_request.number }}/" + build_url="https://ez-systems-developer-documentation--${{ github.event.pull_request.number }}.com.readthedocs.build/${{inputs.project}}en/${{ github.event.pull_request.number }}/" changed_files=$(git diff --name-only HEAD "origin/$GITHUB_BASE_REF" | grep -E ".md$" || [[ $? == 1 ]]) number_of__changed_files=$(echo "$changed_files" | wc -l)