Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improve Docker build #3682

Merged
merged 4 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
* Improve test Dockerfile
* Avoid running into YAML issues before upgrading from go1.19 to 1.20 (must be quoted, otherwise it would become 1.2)
* Let Dependabot update Docker images and GitHub Actions
  • Loading branch information
reneleonhardt authored and kevwan committed Mar 2, 2024
commit cb5932ff438e50c010cf8c95a84864e20a6066ae
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

version: 2
updates:
- package-ecosystem: "docker" # Update image tags in Dockerfile
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions" # Update GitHub Actions
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.19'
check-latest: true
cache: true
id: go
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
uses: actions/setup-go@v4
with:
# use 1.19 to guarantee Go 1.19 compatibility
go-version: 1.19
go-version: '1.19'
check-latest: true
cache: true

Expand Down
9 changes: 4 additions & 5 deletions tools/goctl/test/integration/model/mongo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
FROM golang:1.19
FROM golang:1.21-alpine

ENV TZ Asia/Shanghai
ENV GOPROXY https://goproxy.cn,direct

WORKDIR /app
ADD goctl /usr/bin/goctl
ADD cmd.sh .
COPY goctl /usr/bin/
COPY cmd.sh .

RUN chmod +x /usr/bin/goctl
RUN chmod +x cmd.sh
RUN chmod +x /usr/bin/goctl cmd.sh
CMD ["/bin/bash", "cmd.sh"]
Loading