From 5a82645ab78e9af66d25407ec5b528c13829d381 Mon Sep 17 00:00:00 2001 From: koneill Date: Thu, 5 Sep 2024 14:44:59 -0700 Subject: [PATCH] change to using changed_files --- .github/workflows/renderNotebooks.yaml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/renderNotebooks.yaml b/.github/workflows/renderNotebooks.yaml index da1b4ec..15fbae9 100644 --- a/.github/workflows/renderNotebooks.yaml +++ b/.github/workflows/renderNotebooks.yaml @@ -50,21 +50,19 @@ jobs: - name: Check for changed R Markdown files id: check_rmd_files - run: | - CHANGED_RMD_FILES=$(git diff --name-only HEAD^ HEAD -- '*.Rmd' '*.rmd') - if [ -n "$CHANGED_RMD_FILES" ]; then - echo "Changed R Markdown files:" - echo "$CHANGED_RMD_FILES" - echo "::set-output name=has_changed::true" - echo "$CHANGED_RMD_FILES" > changed_rmd_files.txt - else - echo "No changed R Markdown files found." - echo "::set-output name=has_changed::false" - fi - + uses: tj-actions/changed-files@v45 + with: + files_yaml: | + Rmd: + - '**.Rmd' + - '**.rmd' + + - name: Run Docker container to compile changed R Markdown files - if: steps.check_rmd_files.outputs.has_changed == 'true' + if: steps.check_rmd_files.outputs.test_any_changed == 'true' uses: addnab/docker-run-action@v3 + env: + CHANGED_RMD_FILES: ${{ steps.check_rmd_files.outputs.test_all_changed_files }} with: image: bcgsc/long-pog-rmd:${{ steps.meta_rmd.outputs.tags }} options: |