Skip to content

Commit

Permalink
🔖 v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KevCaz committed Nov 22, 2023
1 parent 61cc57d commit e0a0876
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/R-CMD-check-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
name: R-CMD-check-all

jobs:
# determine what needs to be checked
changes:
runs-on: ubuntu-latest
permissions:
Expand All @@ -26,7 +27,7 @@ jobs:
- 'testpkg01/R'
- 'testpkg02/**'
# JOB to build and test each of modified packages
# Jbuild and test each of modified packages
checkPackages:
needs: changes
# https://github.com/dorny/paths-filter/issues/66
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/build-docker-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,23 @@ on:
name: build-and-release

jobs:
build_r_pkgs:
push_to_registry:

name: Build r package Push Docker image to Docker Hub
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: build archives

- name: Build R packages
run: make rpkgs
- name: Create docker image
run: make docker

push_to_registry:
name: Push Docker image to Docker Hub
needs: build_r_pkgs
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# monoRepoR
[![R-CMD-check-all](https://github.com/inSileco/monoRepoR/actions/workflows/R-CMD-check-all.yaml/badge.svg)](https://github.com/inSileco/monoRepoR/actions/workflows/R-CMD-check-all.yaml)
[![build-and-release](https://github.com/inSileco/monoRepoR/actions/workflows/build-docker-container.yaml/badge.svg)](https://github.com/inSileco/monoRepoR/actions/workflows/build-docker-container.yaml)

Demo repo to apply the same worklows on several packages in a mono repo.
Demo repo to apply the same workflows on several R packages in a monorepo.


## Generating test packages
Expand All @@ -22,9 +24,3 @@ devtools::load_all()
devtools::document()
devtools::check()
```

## Adding the workflows

1. [reusable workflow](https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow)

See https://github.com/r-lib/actions/tree/master/examples

0 comments on commit e0a0876

Please sign in to comment.