@@ -12,22 +12,36 @@ COPY_METADATA:
1212 COPY --dir ".git/" "./"
1313
1414
15- rust-base :
16- FROM rust:1.70.0
15+ alpine-base :
16+ FROM alpine:3.20.3@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a
17+ # renovate: datasource=repology depName=alpine_3_20/bash versioning=loose
18+ ENV BASH_VERSION= "5.2.26-r0"
19+ RUN apk add --no-cache bash= $BASH_VERSION
1720 WORKDIR "/monkey_interpreter"
1821
1922
23+ rust-base :
24+ FROM +alpine-base
25+ # renovate: datasource=repology depName=alpine_3_20/rust versioning=loose
26+ ENV RUST_VERSION= "1.78.0-r0"
27+ RUN apk add --no-cache cargo= $RUST_VERSION
28+
29+
2030check-clean-git-history :
2131 FROM +rust-base
22- RUN cargo install clean_git_history --version 0.1.2 --locked
32+ # renovate: datasource=github-releases depName=DeveloperC286/clean_git_history
33+ ENV CLEAN_GIT_HISTORY_VERSION= "v0.2.0"
34+ RUN wget -O - "https://github.com/DeveloperC286/clean_git_history/releases/download/${CLEAN_GIT_HISTORY_VERSION}/x86_64-unknown-linux-musl.gz" | gzip -d > /usr/bin/clean_git_history && chmod 755 /usr/bin/clean_git_history
2335 DO +COPY_METADATA
2436 ARG from_reference= "origin/HEAD"
2537 RUN ./ci/check-clean-git-history.sh --from-reference "${from_reference}"
2638
2739
2840check-conventional-commits-linting :
2941 FROM +rust-base
30- RUN cargo install conventional_commits_linter --version 0.12.3 --locked
42+ # renovate: datasource=github-releases depName=DeveloperC286/conventional_commits_linter
43+ ENV CONVENTIONAL_COMMITS_LINTER_VERSION= "v0.13.0"
44+ RUN wget -O - "https://github.com/DeveloperC286/conventional_commits_linter/releases/download/${CONVENTIONAL_COMMITS_LINTER_VERSION}/x86_64-unknown-linux-musl.gz" | gzip -d > /usr/bin/conventional_commits_linter && chmod 755 /usr/bin/conventional_commits_linter
3145 DO +COPY_METADATA
3246 ARG from_reference= "origin/HEAD"
3347 RUN ./ci/check-conventional-commits-linting.sh --from-reference "${from_reference}"
@@ -36,12 +50,13 @@ check-conventional-commits-linting:
3650COPY_SOURCECODE :
3751 COMMAND
3852 DO +COPY_CI_DATA
39- COPY --dir "Cargo.lock" "Cargo.toml" "src/" "./"
53+ COPY --if-exists "Cargo.lock" "./"
54+ COPY --dir "Cargo.toml" "src/" "./"
4055
4156
4257rust-formatting-base :
4358 FROM +rust-base
44- RUN rustup component add rustfmt
59+ RUN apk add --no-cache rustfmt= $RUST_VERSION
4560 DO +COPY_SOURCECODE
4661
4762
@@ -51,13 +66,15 @@ check-rust-formatting:
5166
5267
5368golang-base :
54- FROM golang:1.20.13
69+ FROM golang:1.22.1
5570 WORKDIR "/monkey_interpreter"
5671
5772
5873shell-formatting-base :
5974 FROM +golang-base
60- RUN go install mvdan.cc/sh/v3/cmd/
[email protected] 75+ # renovate: datasource=github-releases depName=mvdan/sh
76+ ENV SHFMT_VERSION= "v3.7.0"
77+ RUN go install mvdan.cc/sh/v3/cmd/shfmt@$SHFMT_VERSION
6178 DO +COPY_CI_DATA
6279
6380
@@ -68,7 +85,9 @@ check-shell-formatting:
6885
6986yaml-formatting-base :
7087 FROM +golang-base
71- RUN go install github.com/google/yamlfmt/cmd/
[email protected] 88+ # renovate: datasource=github-releases depName=google/yamlfmt
89+ ENV YAMLFMT_VERSION= "v0.10.0"
90+ RUN go install github.com/google/yamlfmt/cmd/yamlfmt@$YAMLFMT_VERSION
7291 COPY ".yamlfmt" "./"
7392 DO +COPY_CI_DATA
7493
@@ -110,28 +129,25 @@ fix-formatting:
110129
111130check-rust-linting :
112131 FROM +rust-base
113- RUN rustup component add clippy
132+ RUN apk add --no-cache rust- clippy= $RUST_VERSION
114133 DO +COPY_SOURCECODE
115134 RUN ./ci/check-rust-linting.sh
116135
117136
118- ubuntu-base :
119- FROM ubuntu:22.04
120- # https://askubuntu.com/questions/462690/what-does-apt-get-fix-missing-do-and-when-is-it-useful
121- RUN apt-get update --fix-missing
122- WORKDIR "/monkey_interpreter"
123-
124-
125137check-shell-linting :
126- FROM +ubuntu-base
127- RUN apt-get install shellcheck -y
138+ FROM +alpine-base
139+ # renovate: datasource=repology depName=alpine_3_20/shellcheck versioning=loose
140+ ENV SHELLCHECK_VERSION= "0.10.0-r1"
141+ RUN apk add --no-cache shellcheck= $SHELLCHECK_VERSION
128142 DO +COPY_CI_DATA
129143 RUN ./ci/check-shell-linting.sh
130144
131145
132146check-github-actions-workflows-linting :
133147 FROM +golang-base
134- RUN go install github.com/rhysd/actionlint/cmd/
[email protected] 148+ # renovate: datasource=github-releases depName=rhysd/actionlint
149+ ENV ACTIONLINT_VERSION= "v1.6.26"
150+ RUN go install github.com/rhysd/actionlint/cmd/actionlint@$ACTIONLINT_VERSION
135151 DO +COPY_CI_DATA
136152 RUN ./ci/check-github-actions-workflows-linting.sh
137153
0 commit comments