A github action for linting R scripts. This workflow lints only modified files that differ from remote origin master. Any lint warnings or errors will cause a failing status.
The same linting script (scripts/lintr.R) is used for a local pre-commit git hook.
For branches where the default branch is 'main' instead of 'master', set an environment variable in the workflow yaml.
on: [pull_request]
jobs:
lintr_job:
runs-on: ubuntu-latest
name: Lint R code
steps:
- uses: actions/checkout@v1
- name: lintr
id: lintr
uses: docker://foresitelabs/github-action-lintr:v8
env:
DEFAULT_BRANCH: main
Be sure to replace <DOCKERHUB_USER> with your own user acocunt on submission
To update this integration,
./0_build_and_push.sh:cd $(git rev-parse --show-toplevel)
third_party/docker/github-action/lintr/0_build_and_push.sh <DOCKERHUB_USER>
.github/workflows/lintr.yaml to point to the latest image.*Private registries are not currently supported on dockerhub.
This dockerfile is based off https://github.com/EmteZogaf/docker-lintr
Content type
Image
Digest
Size
388 MB
Last updated
over 5 years ago
docker pull foresitelabs/github-action-lintr:v9