From b00d85809069d8a90bebd678bcf4a27f420c92ff Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Wed, 3 Jul 2024 10:28:02 -0400 Subject: [PATCH] first attempt at caching go modules --- .drone.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.drone.yml b/.drone.yml index 0c51660..50d3edc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,6 +6,15 @@ clone: depth: 1 steps: +- name: restore_cache + image: drillster/drone-volume-cache + volumes: + - name: go_module_cache + path: /var/cache/go/mod/ + settings: + restore: true + mount: + - /root/go/pkg/mod/ - name: hugo_prod image: code.ndumas.com/ndumas/hugo:latest commands: @@ -84,3 +93,12 @@ steps: branch: include: - drafts +- name: rebuild_cache + image: drillster/drone-volume-cache + volumes: + - name: go_module_cache + path: /var/cache/go/mod/ + settings: + rebuild: true + mount: + - /root/go/pkg/mod/