diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 1dc6d4c..7660995 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -36,7 +36,7 @@ jobs: - name: Get specific changed files id: image_name - uses: tj-actions/changed-files@v46.0.1 + uses: tj-actions/changed-files@v46.0.3 with: files: ${{ matrix.config.dir }}/* diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 99b018d..c605ad3 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -33,7 +33,7 @@ jobs: - name: Get specific changed files id: image_name - uses: tj-actions/changed-files@vv46.0.1 + uses: tj-actions/changed-files@v46.0.3 with: files: ${{ matrix.config.dir }}/* diff --git a/ottrpal/Dockerfile b/ottrpal/Dockerfile new file mode 100644 index 0000000..b693fd9 --- /dev/null +++ b/ottrpal/Dockerfile @@ -0,0 +1,10 @@ +FROM jhudsl/base_ottr:dev +LABEL maintainer="cansav09@gmail.com" + +WORKDIR /app + +COPY entrypoint.sh . + +RUN chmod +x entrypoint.sh + +ENTRYPOINT ["/app/entrypoint.sh"] diff --git a/ottrpal/entrypoint.sh b/ottrpal/entrypoint.sh new file mode 100755 index 0000000..fda3bf1 --- /dev/null +++ b/ottrpal/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ "$1" = "rmd" ]; then + Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')" +elif [ "$1" = "quarto" ]; then + Rscript -e "quarto::quarto_render('.')" +elif [ "$1" = "spelling" ] || [ "$1" = "urls" ] || [ "$1" = "quiz_format" ]; then + Rscript -e "ottrpal::ottr_check(check_type = '$1')" + # Save output + echo "error_name=$error_name" >> $GITHUB_OUTPUT + echo "report_path=$report_path" >> $GITHUB_OUTPUT + echo "chk_results=$chk_results" >> $GITHUB_OUTPUT +else + echo Viable options are "render_rmd", "render_quarto", "spelling", "urls", "quiz_format" +fi