forked from user-workshop-cicd/r.package.example
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 978 Bytes
/
check.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
name: Check 🛠
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
push:
branches:
- main
# This reusable workflow from insightsengineering/r.pkg.template will run once a PR to main branch is created.
jobs:
job-setup:
name: Should we run R CMD check?
runs-on: ubuntu-latest
outputs:
check_out: ${{ steps.check.outputs.run_r_cmd_check }}
steps:
# We can have much more advanced logic to decide which jobs we want to run.
- name: To check or not to check?
id: check
run: |
echo "run_r_cmd_check=false" >> $GITHUB_OUTPUT
r-cmd:
name: R CMD Check 🧬
needs: job-setup
# Call a workflow from a given GitHub repository, from a given branch (or tag).
uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main
if: >
needs.job-setup.outputs.check_out == 'true'