From 19726566f3ad4840b22032da26136c1296a0b1ac Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 14:39:30 -0700 Subject: [PATCH 1/5] Add linting workflows --- .github/workflows/hadolint.yml | 22 ++++++++++++++++++++++ .github/workflows/shellcheck.yml | 16 ++++++++++++++++ .github/workflows/validate_pr.yml | 26 ++++++++++++++++++++++++++ .github/workflows/yamllint.yml | 16 ++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 .github/workflows/hadolint.yml create mode 100644 .github/workflows/shellcheck.yml create mode 100644 .github/workflows/validate_pr.yml create mode 100644 .github/workflows/yamllint.yml diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml new file mode 100644 index 0000000..97bc649 --- /dev/null +++ b/.github/workflows/hadolint.yml @@ -0,0 +1,22 @@ +--- +name: hadolint + +"on": + pull_request: + branches: + - develop + +jobs: + hadolint: + name: hadolint + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + - name: Run hadolint (R images) + uses: hadolint/hadolint-action@v3.3.0 + with: + dockerfile: images/labkey/*/Dockerfile + recursive: true + failure-threshold: 'warning' + ignore: 'DL3008' # Don't worry about pinning versions diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 0000000..8a383f8 --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,16 @@ +--- +name: 'Run Shellcheck' + +"on": + - pull_request + +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@2.0.0 diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml new file mode 100644 index 0000000..646e30d --- /dev/null +++ b/.github/workflows/validate_pr.yml @@ -0,0 +1,26 @@ +--- +# Workflow to validate Pull Request branches +name: PR Validation + +# Trigger on PR creation +"on": + pull_request: + types: + - opened + - reopened + - ready_for_review + +jobs: + validate_pr: + if: github.event.pull_request.head.repo.owner.login == 'LabKey' + runs-on: ubuntu-latest + + steps: + - name: Validate PR Branches + uses: LabKey/gitHubActions/validate-pr@develop + with: + pr_base: ${{ github.event.pull_request.base.ref }} + pr_head: ${{ github.event.pull_request.head.ref }} + pr_number: ${{ github.event.pull_request.number }} + pr_title: ${{ github.event.pull_request.title }} + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..6501a99 --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,16 @@ +--- +name: 'Yamllint GitHub Actions' + +"on": + - pull_request + +jobs: + yamllint: + name: 'Yamllint' + runs-on: ubuntu-latest + steps: + - name: 'Checkout' + uses: actions/checkout@v6 + + - name: yaml-lint + uses: ibiqlik/action-yamllint@v3 From fa0c8463272a4d9b934b3ef8f04080a28415b9ab Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 14:30:21 -0700 Subject: [PATCH 2/5] Fix hadolint findings in r and rstudio-base Dockerfiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit r/Dockerfile: - Consolidate the three apt-get RUN instructions into one (DL3059) and clean up /var/lib/apt/lists afterward (DL3009). - Add --no-install-recommends to the r-cran-* install (DL3015). - Fix 'ln -fs .../America/Los_Angeles/etc/localtime' — a missing space glued the source and destination into one argument, so ln was silently linking into the wrong place (SC2226). rstudio-base/Dockerfile: - Set SHELL with -o pipefail so the piped 'R --version | grep' RUN fails loudly on error instead of masking it (DL4006). --- images/labkey/r/Dockerfile | 17 ++++++++--------- images/labkey/rstudio-base/Dockerfile | 2 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/images/labkey/r/Dockerfile b/images/labkey/r/Dockerfile index e55fb22..5454957 100644 --- a/images/labkey/r/Dockerfile +++ b/images/labkey/r/Dockerfile @@ -2,12 +2,9 @@ ARG VERSION=18.04 FROM ubuntu:${VERSION} RUN apt-get update && \ - apt-get install -y --no-install-recommends apt-transport-https apt-utils software-properties-common - -RUN apt-get install -y --no-install-recommends build-essential dos2unix libopenblas-dev libssl-dev libxml2-dev nano pandoc procps xvfb x11-common - -# NOTE much faster to use apt to install prebuilt packages than using "install.packages()" -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ + apt-get install -y --no-install-recommends apt-transport-https apt-utils software-properties-common && \ + apt-get install -y --no-install-recommends build-essential dos2unix libopenblas-dev libssl-dev libxml2-dev nano pandoc procps xvfb x11-common && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ r-base \ r-cran-bitops \ r-cran-cairo \ @@ -28,12 +25,14 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ r-cran-markdown \ r-cran-scales \ r-cran-stringr \ - r-cran-tidyr + r-cran-tidyr && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* COPY install.R /tmp/ -RUN R --vanilla -f /tmp/install.R +RUN R --vanilla -f /tmp/install.R -RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles/etc/localtime && \ +RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime && \ dpkg-reconfigure --frontend noninteractive tzdata RUN R --version diff --git a/images/labkey/rstudio-base/Dockerfile b/images/labkey/rstudio-base/Dockerfile index e1bea03..402fdf3 100644 --- a/images/labkey/rstudio-base/Dockerfile +++ b/images/labkey/rstudio-base/Dockerfile @@ -1,6 +1,8 @@ ARG VERSION=4.0.5 FROM rocker/rstudio:${VERSION} +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + RUN apt-get update && \ apt-get install -y --no-install-recommends apt-utils && \ apt-get install -y --no-install-recommends dos2unix nano procps libxml2-dev xvfb zlib1g-dev && \ From 29a106695cca9c1736efe2f6edfafa304b1ed585 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 14:43:41 -0700 Subject: [PATCH 3/5] Ignore .claude --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b13ebc3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.claude/ \ No newline at end of file From f18a370e4d96e678facc3d50de6f3bb1dd0ac87c Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 14:45:16 -0700 Subject: [PATCH 4/5] Add dependency for fs R package --- images/labkey/rsandbox/Dockerfile | 2 +- images/labkey/rstudio/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/labkey/rsandbox/Dockerfile b/images/labkey/rsandbox/Dockerfile index 973167b..d4cd962 100644 --- a/images/labkey/rsandbox/Dockerfile +++ b/images/labkey/rsandbox/Dockerfile @@ -3,7 +3,7 @@ FROM rocker/r-ver:${VERSION} RUN apt-get update && \ apt-get install -y --no-install-recommends apt-transport-https apt-utils software-properties-common && \ - apt-get install -y --no-install-recommends build-essential dos2unix libopenblas-dev libxml2-dev nano pandoc procps xvfb x11-common && \ + apt-get install -y --no-install-recommends build-essential dos2unix libopenblas-dev libxml2-dev nano pandoc procps xvfb x11-common libuv1-dev && \ apt-get install -y --no-install-recommends sudo && \ apt-get install -y --no-install-recommends \ curl libcurl4-openssl-dev \ diff --git a/images/labkey/rstudio/Dockerfile b/images/labkey/rstudio/Dockerfile index 4d9bb89..c393b0a 100644 --- a/images/labkey/rstudio/Dockerfile +++ b/images/labkey/rstudio/Dockerfile @@ -5,7 +5,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ curl libcurl4-openssl-dev \ libgd-dev libcairo2 libcairo2-dev libxt-dev pandoc \ - libssl-dev openssl && \ + libssl-dev openssl libuv1-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* From 5f3564bc9f68cbcb4c2dcc802654cb76bb00a618 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 17:01:09 -0700 Subject: [PATCH 5/5] Install earlier --- images/labkey/rstudio-base/Dockerfile | 2 +- images/labkey/rstudio/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/labkey/rstudio-base/Dockerfile b/images/labkey/rstudio-base/Dockerfile index 402fdf3..1583877 100644 --- a/images/labkey/rstudio-base/Dockerfile +++ b/images/labkey/rstudio-base/Dockerfile @@ -5,7 +5,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update && \ apt-get install -y --no-install-recommends apt-utils && \ - apt-get install -y --no-install-recommends dos2unix nano procps libxml2-dev xvfb zlib1g-dev && \ + apt-get install -y --no-install-recommends dos2unix nano procps libxml2-dev xvfb zlib1g-dev libuv1-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* diff --git a/images/labkey/rstudio/Dockerfile b/images/labkey/rstudio/Dockerfile index c393b0a..4d9bb89 100644 --- a/images/labkey/rstudio/Dockerfile +++ b/images/labkey/rstudio/Dockerfile @@ -5,7 +5,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ curl libcurl4-openssl-dev \ libgd-dev libcairo2 libcairo2-dev libxt-dev pandoc \ - libssl-dev openssl libuv1-dev && \ + libssl-dev openssl && \ apt-get clean && \ rm -rf /var/lib/apt/lists/*