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 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 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/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-base/Dockerfile b/images/labkey/rstudio-base/Dockerfile index e1bea03..1583877 100644 --- a/images/labkey/rstudio-base/Dockerfile +++ b/images/labkey/rstudio-base/Dockerfile @@ -1,9 +1,11 @@ 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 && \ + 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/*