@@ -12,22 +12,36 @@ COPY_METADATA:
12
12
COPY --dir ".git/" "./"
13
13
14
14
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
17
20
WORKDIR "/monkey_interpreter"
18
21
19
22
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
+
20
30
check-clean-git-history :
21
31
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
23
35
DO +COPY_METADATA
24
36
ARG from_reference= "origin/HEAD"
25
37
RUN ./ci/check-clean-git-history.sh --from-reference "${from_reference}"
26
38
27
39
28
40
check-conventional-commits-linting :
29
41
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
31
45
DO +COPY_METADATA
32
46
ARG from_reference= "origin/HEAD"
33
47
RUN ./ci/check-conventional-commits-linting.sh --from-reference "${from_reference}"
@@ -36,12 +50,13 @@ check-conventional-commits-linting:
36
50
COPY_SOURCECODE :
37
51
COMMAND
38
52
DO +COPY_CI_DATA
39
- COPY --dir "Cargo.lock" "Cargo.toml" "src/" "./"
53
+ COPY --if-exists "Cargo.lock" "./"
54
+ COPY --dir "Cargo.toml" "src/" "./"
40
55
41
56
42
57
rust-formatting-base :
43
58
FROM +rust-base
44
- RUN rustup component add rustfmt
59
+ RUN apk add --no-cache rustfmt= $RUST_VERSION
45
60
DO +COPY_SOURCECODE
46
61
47
62
@@ -51,13 +66,15 @@ check-rust-formatting:
51
66
52
67
53
68
golang-base :
54
- FROM golang:1.20.13
69
+ FROM golang:1.22.1
55
70
WORKDIR "/monkey_interpreter"
56
71
57
72
58
73
shell-formatting-base :
59
74
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
61
78
DO +COPY_CI_DATA
62
79
63
80
@@ -68,7 +85,9 @@ check-shell-formatting:
68
85
69
86
yaml-formatting-base :
70
87
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
72
91
COPY ".yamlfmt" "./"
73
92
DO +COPY_CI_DATA
74
93
@@ -110,28 +129,25 @@ fix-formatting:
110
129
111
130
check-rust-linting :
112
131
FROM +rust-base
113
- RUN rustup component add clippy
132
+ RUN apk add --no-cache rust- clippy= $RUST_VERSION
114
133
DO +COPY_SOURCECODE
115
134
RUN ./ci/check-rust-linting.sh
116
135
117
136
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
-
125
137
check-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
128
142
DO +COPY_CI_DATA
129
143
RUN ./ci/check-shell-linting.sh
130
144
131
145
132
146
check-github-actions-workflows-linting :
133
147
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
135
151
DO +COPY_CI_DATA
136
152
RUN ./ci/check-github-actions-workflows-linting.sh
137
153
0 commit comments