diff --git a/.github/workflows/R-CMD-check-all.yaml b/.github/workflows/R-CMD-check-all.yaml index b0b6ab5..cb2043d 100644 --- a/.github/workflows/R-CMD-check-all.yaml +++ b/.github/workflows/R-CMD-check-all.yaml @@ -7,6 +7,7 @@ on: name: R-CMD-check-all jobs: + # determine what needs to be checked changes: runs-on: ubuntu-latest permissions: @@ -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 diff --git a/.github/workflows/build-docker-container.yaml b/.github/workflows/build-docker-container.yaml index 9606779..56b4c4f 100644 --- a/.github/workflows/build-docker-container.yaml +++ b/.github/workflows/build-docker-container.yaml @@ -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 diff --git a/README.md b/README.md index 8dc7541..10906eb 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 \ No newline at end of file