From 4c489387ea3c521f439b0eb64cb536262bcc28c7 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Thu, 2 Nov 2023 14:54:18 -0400 Subject: [PATCH] Save session info to a file and archive upload it --- .github/workflows/check-url.yml | 8 ++++++++ scripts/find_issue.R | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-url.yml b/.github/workflows/check-url.yml index 6320efa5..680c28f2 100644 --- a/.github/workflows/check-url.yml +++ b/.github/workflows/check-url.yml @@ -90,6 +90,14 @@ jobs: echo URL issue exists: $issue_exists echo "issue_exists=$issue_exists" >> $GITHUB_OUTPUT + # We want to retrieve this file after this runs so we can see what spell check errors were detected + - name: Archive session info + uses: actions/upload-artifact@v3 + # These arguments underneath `with` are generally action specific so we have to check the documentation: https://github.com/marketplace/actions/upload-a-build-artifact + with: + name: session_info.txt + path: session_info.txt + - name: If too many URL errors, then make an issue if: ${{ steps.check-report.outputs.error_num >= 1 && steps.find-issue.outputs.issue_exists == 'FALSE'}} uses: JasonEtco/create-an-issue@v2 diff --git a/scripts/find_issue.R b/scripts/find_issue.R index 366ddd8c..1baface5 100644 --- a/scripts/find_issue.R +++ b/scripts/find_issue.R @@ -24,7 +24,7 @@ option_list <- list( ) # Print out the result -message(unlist(sessionInfo())) +write(unlist(sessionInfo()), "session_info.txt") # Read the arguments passed opt_parser <- optparse::OptionParser(option_list = option_list)