From e48076f7038fc79f839cee787355e7173ae24d7f Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Thu, 22 Sep 2022 14:09:47 +0200 Subject: [PATCH] chore(ci): restore cache while code checkout --- .agola/config.yml | 9 ++++++++- .gitignore | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.agola/config.yml b/.agola/config.yml index 6f1b23f..328b1f4 100644 --- a/.agola/config.yml +++ b/.agola/config.yml @@ -6,9 +6,14 @@ runs: runtime: type: pod containers: - - image: docker.io/alpine/git + - image: docker.io/golang:1.19-bullseye + environment: + GOMODCACHE: /project/.go steps: - clone: + - run: + name: Download Go dependencies + command: go mod tidy --go=1.19 - save_to_workspace: contents: - source_dir: . @@ -21,6 +26,7 @@ runs: containers: - image: docker.io/golang:1.19-bullseye environment: + GOMODCACHE: /project/.go DOCKER_HOST: tcp://127.0.0.1:2375 - image: code.icb4dc0.de/prskr/ci-images/dind:latest privileged: true @@ -43,6 +49,7 @@ runs: containers: - image: docker.io/golangci/golangci-lint environment: + GOMODCACHE: /project/.go GO111MODULE: "on" CGO_ENABLED: "0" steps: diff --git a/.gitignore b/.gitignore index f81058c..18067a7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ dist/ .idea/ -cue.mod/ \ No newline at end of file +cue.mod/ +.go/ \ No newline at end of file