From 51c45f871032c8807dd3c7d2f42227aae575bf51 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Tue, 12 Nov 2024 05:59:08 -0600 Subject: [PATCH] fix: Move rebuild condition inside shell --- .github/workflows/build-check-install.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index f49a8d91..024e2708 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -841,8 +841,7 @@ jobs: if: > (inputs.disable-unit-test-reports != 'true' || startsWith(github.ref, 'refs/tags/v')) && - github.event_name != 'pull_request' && - inputs.disable-package-rebuild-and-upload != 'true' + github.event_name != 'pull_request' run: | # Undo changes to DESCRIPTION and tests/testthat.R git checkout DESCRIPTION @@ -855,7 +854,13 @@ jobs: export $(tr '\n' ' ' < /tmp/dotenv.env) } fi - R CMD build . + if [ "${{ inputs.disable-package-rebuild-and-upload }}" != "true" ] + then { + R CMD build . + } else { + echo "🙅🏼‍♀️ Not rebuilding package for uploads" + } + fi shell: bash working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}