Skip to content

Commit

Permalink
change to using changed_files
Browse files Browse the repository at this point in the history
  • Loading branch information
oneillkza committed Sep 5, 2024
1 parent 21370c4 commit 5a82645
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/renderNotebooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 5a82645

Please sign in to comment.