From 7d64b4720cf173b0aca9c55847de18e1c4b1ad3c Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:15:23 -0600 Subject: [PATCH] feat: Add option to disable package rebuilds and uploads --- .github/workflows/build-check-install.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index df85c1d9..f49a8d91 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -241,6 +241,11 @@ on: required: false type: string default: "unit-test-report" + disable-package-rebuild-and-upload: + description: This will disable the package rebuild and upload step for versioned tags. + required: false + type: boolean + default: false concurrency: group: r-cmd-${{ inputs.concurrency-group }}-${{ github.event.pull_request.number || github.ref }} @@ -836,7 +841,8 @@ jobs: if: > (inputs.disable-unit-test-reports != 'true' || startsWith(github.ref, 'refs/tags/v')) && - github.event_name != 'pull_request' + github.event_name != 'pull_request' && + inputs.disable-package-rebuild-and-upload != 'true' run: | # Undo changes to DESCRIPTION and tests/testthat.R git checkout DESCRIPTION @@ -854,7 +860,9 @@ jobs: working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }} - name: Upload package build ⤴ - if: startsWith(github.ref, 'refs/tags/v') + if: > + startsWith(github.ref, 'refs/tags/v') && + inputs.disable-package-rebuild-and-upload != 'true' uses: actions/upload-artifact@v4 with: path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}/${{ env.PKGBUILD }}