From f77172f53424df9d84342ee402912ba27f26452d Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Fri, 12 Jul 2024 09:27:07 +0200 Subject: [PATCH] [GHA] Download the scripts to make workflow reusable # Motivation The reusable workflow is intended to be called from other repos; however, the workflow contains jobs that execute shell scripts. Those scripts are part of the NIO repo. When another repo calls the reusable workflow those scripts aren't present on the machine. # Modification This PR downloads the scripts via curl and executes them. # Result Makes the reusable workflow truly reusable --- .github/workflows/reusable_pull_request.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable_pull_request.yml b/.github/workflows/reusable_pull_request.yml index f6ae37340f..5fe2d67475 100644 --- a/.github/workflows/reusable_pull_request.yml +++ b/.github/workflows/reusable_pull_request.yml @@ -122,7 +122,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Run documentation check - run: ./scripts/check-docs.sh + run: | + apt-get -qq update && apt-get -qq -y install curl + curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-docs.sh | bash unacceptable-language-check: name: Unacceptable language check @@ -135,4 +137,4 @@ jobs: - name: Run unacceptable language check env: UNACCEPTABLE_WORD_LIST: ${{ inputs.unacceptable_language_check_word_list}} - run: ./scripts/check-unacceptable-language.sh \ No newline at end of file + run: curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-unacceptable-language.sh | bash \ No newline at end of file