-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: docker build -f renv.Dockerfile -t my-renv-name . | ||
- run: docker run --rm --name my_renv_container -v /github/workspace/output/:/workspace/output/:rw my-renv-name | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: /github/workspace/output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
# playground | ||
|
||
## Run last R package versions in Github Actions (faster but unsafer) | ||
## Github Actions | ||
|
||
Look the [.github/workflows/main.yml](.github/workflows/main.yml) file. | ||
With [.github/workflows/main.yml](.github/workflows/main.yml) last R package versions are used (faster but unsafer). | ||
|
||
The output files will be uploaded as an artifact zip of the executed job. | ||
With [.github/workflows/renv.yml](.github/workflows/renv.yml) locked R packave versions are used (slower but more reproducible). | ||
|
||
The output files will be uploaded as an artifact zip of the executed jobs. | ||
|
||
## Run last R package versions in a local computer (faster but unsafer) | ||
## Run in local Docker container | ||
|
||
First clone the repository in your computer: | ||
|
||
``` | ||
$ git clone https://github.com/jrosell/playground | ||
$ cd playground | ||
$ docker build -t my-image-name . && docker run --rm -u $(id -u):$(id -g) --name my_pipeline_container -v $(pwd)/output:/workspace/output/:rw my-image-name | ||
``` | ||
|
||
Then build the image and run the container. | ||
|
||
## Run specific R package versions in a local computer (slower but reproducible) | ||
- Last R package versions in a local computer (faster but unsafer): | ||
|
||
Add renv.lock in your root folder and run: | ||
``` | ||
$ docker build -t my-image-name . && docker run --rm -u $(id -u):$(id -g) --name my_pipeline_container -v $(pwd)/output:/workspace/output/:rw my-image-name | ||
``` | ||
|
||
- Run specific R package versions in a local computer (slower but reproducible): | ||
|
||
``` | ||
``` | ||
$ docker build -f renv.Dockerfile -t my-renv-name . && docker run --rm -u $(id -u):$(id -g) --name my_renv_container -v $(pwd)/output:/workspace/output/:rw my-renv-name | ||
``` | ||
``` | ||
|
||
It will use the renv.lock in your root folder. |