Skip to content

trigger-workflow-render-rmarkdown #24

trigger-workflow-render-rmarkdown

trigger-workflow-render-rmarkdown #24

on:
repository_dispatch:
types: [trigger-workflow-render-rmarkdown]
name: Render-R-markdown
jobs:
render-rmarkdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed .Rmd file(s)
id: changed-Rmd-files
uses: tj-actions/changed-files@v35
with:
files: '**.Rmd'
- name: If any .Rmd file(s) changed then render R markdown file(s) and commit
if: steps.changed-Rmd-files.outputs.any_changed == 'true'
uses: ./.github/workflows/render-rmarkdown
- name: Trigger next workflow
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
event-type: trigger-workflow-lint
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'