Skip to content

Commit

Permalink
Merge pull request #20 from carpentries-incubator/znk-fix-workflows-2…
Browse files Browse the repository at this point in the history
…022-10-20

urgent: fix workflows
  • Loading branch information
tompollard authored Oct 21, 2022
2 parents a8b9e01 + 99d0300 commit f80a192
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,14 @@ jobs:
id: check-rmd
working-directory: lesson
run: |
echo "::set-output name=count::$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})"
echo "count=$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})" >> $GITHUB_OUTPUT
- name: Set up R
if: steps.check-rmd.outputs.count != 0
uses: r-lib/actions/setup-r@master
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true
install-r: false

- name: Install needed packages
if: steps.check-rmd.outputs.count != 0
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ jobs:
- name: Look for R-markdown files
id: check-rmd
run: |
echo "::set-output name=count::$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})"
echo "count=$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})" >> $GITHUB_OUTPUT
- name: Set up R
if: steps.check-rmd.outputs.count != 0
uses: r-lib/actions/setup-r@master
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true
install-r: false

- name: Restore R Cache
if: steps.check-rmd.outputs.count != 0
Expand Down

0 comments on commit f80a192

Please sign in to comment.