-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: R Package Validation report | ||
|
||
on: # Run this action when a release is published | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
r-pkg-validation: | ||
name: Create report 📃 | ||
runs-on: ubuntu-latest | ||
# Set Github token permissions | ||
permissions: | ||
contents: write | ||
packages: write | ||
deployments: write | ||
steps: | ||
- name: Checkout repo 🛎 | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build report 🏗 | ||
uses: insightsengineering/thevalidatoR@main | ||
with: | ||
# R package root path, in case your R package is within a subdirectory of the repo | ||
report_pkg_dir: "." | ||
# Template location | ||
report_template_path: ".github/validation_template.rmd" | ||
# Report format - provided to `rmarkdown::render` `output_format` | ||
report_rmarkdown_format: "pdf_document" | ||
|
||
# Upload the validation report to the release | ||
- name: Upload report to release 🔼 | ||
if: success() | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: ./validation-report.pdf | ||
asset_name: validation-report.pdf | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
overwrite: false |