Skip to content

Commit 2e7a39f

Browse files
committed
ci(dependabot): externalize go dependencies
1 parent b1436f3 commit 2e7a39f

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ updates:
1717
default-days: 7
1818
commit-message:
1919
prefix: build(deps)
20+
- package-ecosystem: "gomod"
21+
directory: "/aws-cli"
22+
schedule:
23+
interval: "daily"
24+
cooldown:
25+
default-days: 7
26+
commit-message:
27+
prefix: build(deps)
2028
- package-ecosystem: "github-actions"
2129
directory: "/"
2230
schedule:

aws-cli/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARG USER_ID=1000
1010

1111
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
1212

13+
# FIXME @TL golang needed until Amazon Linux gets an yq package
1314
RUN dnf upgrade -y \
1415
&& dnf install -y \
1516
awscli-2-2.32.1-1.amzn2023.0.1 \
@@ -53,8 +54,13 @@ RUN pipx ensurepath --global \
5354
&& xargs -a /tmp/requirements.txt -n 1 pipx install --global \
5455
&& rm -f /tmp/requirements.txt
5556

57+
COPY go.mod /tmp/go.mod
58+
5659
# FIXME @TL workaround until Amazon Linux gets an yq package
57-
RUN GOBIN=/usr/local/bin go install github.com/mikefarah/yq/[email protected]
60+
RUN grep -E '^require\s+[a-zA-Z0-9/._-]+\s+v[0-9]+\.[0-9]+\.[0-9]+$' /tmp/go.mod | awk '{print $2"@"$3}' | while read package; do \
61+
GOBIN=/usr/local/bin go install "${package}"; \
62+
done \
63+
&& rm -f /tmp/go.mod
5864

5965
RUN chmod 777 /opt \
6066
&& adduser --home-dir "${USER_HOME}" --uid "${USER_ID}" "${USER_NAME}"

aws-cli/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module leplus.org/docker-aws-cli
2+
3+
go 1.25.4
4+
5+
require github.com/mikefarah/yq/v4 v4.47.1

aws-cli/go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github.com/mikefarah/yq/v4 v4.47.1/go.mod h1:+WQ438aOXAHcpWAJxhXXesdVpYR0pb8JszUMFymzeqQ=

0 commit comments

Comments
 (0)