From 69e8d3d7895df112296b7841d66c93ed841ad8a2 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Wed, 29 Jan 2025 12:03:48 -0500 Subject: [PATCH 1/5] Update --- ottrpal/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ottrpal/Dockerfile diff --git a/ottrpal/Dockerfile b/ottrpal/Dockerfile new file mode 100644 index 0000000..c23c1b3 --- /dev/null +++ b/ottrpal/Dockerfile @@ -0,0 +1,12 @@ +FROM jhudsl/base_ottr +LABEL maintainer="cansav09@gmail.com" + +RUN installGithub.r \ + jhudsl/ottrpal \ + jhudsl/cow + + +ARG CHECK_TYPE +ENV CHECK_TYPE=${INPUT_CHECK_TYPE} + +ENTRYPOINT ["Rscript -e 'ottrpal::check(check_type == ${INPUT_CHECK_TYPE})'"] From 4b9a3a5d1ecae273fd61317f57268bc928e04b8f Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Thu, 30 Jan 2025 14:49:57 -0500 Subject: [PATCH 2/5] Make it executable --- ottrpal/Dockerfile | 12 +++++------- ottrpal/entrypoint.sh | 8 ++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100755 ottrpal/entrypoint.sh diff --git a/ottrpal/Dockerfile b/ottrpal/Dockerfile index c23c1b3..b693fd9 100644 --- a/ottrpal/Dockerfile +++ b/ottrpal/Dockerfile @@ -1,12 +1,10 @@ -FROM jhudsl/base_ottr +FROM jhudsl/base_ottr:dev LABEL maintainer="cansav09@gmail.com" -RUN installGithub.r \ - jhudsl/ottrpal \ - jhudsl/cow +WORKDIR /app +COPY entrypoint.sh . -ARG CHECK_TYPE -ENV CHECK_TYPE=${INPUT_CHECK_TYPE} +RUN chmod +x entrypoint.sh -ENTRYPOINT ["Rscript -e 'ottrpal::check(check_type == ${INPUT_CHECK_TYPE})'"] +ENTRYPOINT ["/app/entrypoint.sh"] diff --git a/ottrpal/entrypoint.sh b/ottrpal/entrypoint.sh new file mode 100755 index 0000000..2dee541 --- /dev/null +++ b/ottrpal/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +Rscript -e "ottrpal::ottr_check(check_type = '$1', path = '$2')" + +# Save output +echo "error_name=$error_name" >> $GITHUB_OUTPUT +echo "report_path=$report_path" >> $GITHUB_OUTPUT +echo "chk_results=$chk_results" >> $GITHUB_OUTPUT From 9e954ae4fc7da65cae4a51097f2c21d96288117d Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Thu, 3 Apr 2025 15:27:57 -0400 Subject: [PATCH 3/5] Update ottrpal image --- ottrpal/entrypoint.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ottrpal/entrypoint.sh b/ottrpal/entrypoint.sh index 2dee541..fda3bf1 100755 --- a/ottrpal/entrypoint.sh +++ b/ottrpal/entrypoint.sh @@ -1,8 +1,15 @@ #!/bin/sh -Rscript -e "ottrpal::ottr_check(check_type = '$1', path = '$2')" - -# Save output -echo "error_name=$error_name" >> $GITHUB_OUTPUT -echo "report_path=$report_path" >> $GITHUB_OUTPUT -echo "chk_results=$chk_results" >> $GITHUB_OUTPUT +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 From 1f9abb2ad38df3f9e252de26549b7a62d1472a40 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Thu, 3 Apr 2025 15:45:56 -0400 Subject: [PATCH 4/5] Update merge.yml --- .github/workflows/merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }}/* From 546e2b5602f85d5e41b746f90c8820a55835b9b0 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Thu, 3 Apr 2025 15:47:02 -0400 Subject: [PATCH 5/5] Update pull_request.yml --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }}/*