Skip to content

clean up example

clean up example #20

Workflow file for this run

---
name: R Package Validation report πŸ“ƒ
on:
push:
tags:
- "v*"
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
- pre-release
workflow_dispatch:
workflow_call:
inputs:
install-system-dependencies:
description: Check for and install system dependencies
required: false
default: false
type: boolean
enable-staged-dependencies-check:
description: Enable staged dependencies YAML check
required: false
default: true
type: boolean
secrets:
GITHUB_TOKEN:

Check failure on line 33 in .github/workflows/validation.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/validation.yaml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
description: |
Github token with read access to repositories, required for staged.dependencies installation
required: false
concurrency:
group: validation-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validation:
name: Create report πŸ“ƒ
runs-on: ubuntu-latest
if: >
!contains(github.event.commits[0].message, '[skip validation]')
&& github.event.pull_request.draft == false
container:
image: ghcr.io/insightsengineering/rstudio_4.2.1_bioc_3.15:latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
packages: write
deployments: write
steps:
- name: Checkout repo πŸ›Ž
uses: actions/checkout@v3
- name: Run Staged dependencies 🎦
uses: insightsengineering/staged-dependencies-action@v1
with:
run-system-dependencies: ${{ inputs.install-system-dependencies }}
env:
SD_ENABLE_CHECK: ${{ inputs.enable-staged-dependencies-check }}
- name: Build report πŸ—
uses: insightsengineering/thevalidatoR@v1
with:
report_output_prefix: validation_report
- name: Upload report for review ⬆
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: validation_report.pdf
path: validation_report.pdf
upload-release-assets:
name: Upload report to release πŸ”Ό
needs: validation
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download artifact ⏬
uses: actions/download-artifact@v3
with:
name: validation_report.pdf
- name: Upload report to release πŸ”Ό
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: true