build: install clj-kondo from its container image (#5064)

Instead of providing a script to install clj-kondo, grab it from its
container image so that we can benefit from automated dependency
updates.
This commit is contained in:
Marco Ferrari 2023-12-25 12:41:40 +01:00 committed by GitHub
parent 69a45e022d
commit 1dc74e194e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 16 deletions

View file

@ -27,6 +27,7 @@ FROM rhysd/actionlint:1.6.26 as actionlint
FROM scalameta/scalafmt:v3.7.17 as scalafmt FROM scalameta/scalafmt:v3.7.17 as scalafmt
FROM zricethezav/gitleaks:v8.18.1 as gitleaks FROM zricethezav/gitleaks:v8.18.1 as gitleaks
FROM yoheimuta/protolint:0.47.3 as protolint FROM yoheimuta/protolint:0.47.3 as protolint
FROM ghcr.io/clj-kondo/clj-kondo:2023.05.18-alpine as clj-kondo
FROM python:3.12.1-alpine3.19 as base_image FROM python:3.12.1-alpine3.19 as base_image
@ -215,6 +216,11 @@ ARG GLIBC_VERSION
COPY scripts/install-glibc.sh / COPY scripts/install-glibc.sh /
RUN --mount=type=secret,id=GITHUB_TOKEN /install-glibc.sh && rm -rf /install-glibc.sh RUN --mount=type=secret,id=GITHUB_TOKEN /install-glibc.sh && rm -rf /install-glibc.sh
#####################
# Install clj-kondo #
#####################
COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
################# #################
# Install Lintr # # Install Lintr #
################# #################
@ -242,13 +248,6 @@ WORKDIR /
COPY scripts/install-phive.sh / COPY scripts/install-phive.sh /
RUN /install-phive.sh && rm -rf /install-phive.sh RUN /install-phive.sh && rm -rf /install-phive.sh
#####################
# Install clj-kondo #
#####################
ARG CLJ_KONDO_VERSION='2023.05.18'
COPY scripts/install-clj-kondo.sh /
RUN /install-clj-kondo.sh && rm -rf /install-clj-kondo.sh
################## ##################
# Install ktlint # # Install ktlint #
################## ##################

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo
chmod +x install-clj-kondo
./install-clj-kondo --dir /usr/bin/ --download-dir /usr/bin/ --version "${CLJ_KONDO_VERSION}"