From 23cfe3bd67e91f1f21afdd31b05f1f7766831967 Mon Sep 17 00:00:00 2001 From: George Gevoian Date: Wed, 6 Apr 2022 18:41:03 -0700 Subject: [PATCH] (core) Add caching to Docker workflows Summary: Updates GitHub workflows to cache image builds. This should speed up most builds. Test Plan: Tested manually in fork of grist-core. Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D3363 --- .github/workflows/docker.yml | 2 ++ .github/workflows/docker_latest.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bb76870f..6a808cd5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -39,3 +39,5 @@ jobs: push: true platforms: linux/amd64,linux/arm64/v8 tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/docker_latest.yml b/.github/workflows/docker_latest.yml index a05aeec1..759fab39 100644 --- a/.github/workflows/docker_latest.yml +++ b/.github/workflows/docker_latest.yml @@ -34,6 +34,7 @@ jobs: context: . load: true tags: ${{ github.repository_owner }}/grist:latest + cache-from: type=gha - name: Use Node.js ${{ matrix.node-version }} for testing uses: actions/setup-node@v1 with: @@ -64,6 +65,8 @@ jobs: platforms: linux/amd64,linux/arm64/v8 push: true tags: ${{ github.repository_owner }}/grist:latest + cache-from: type=gha + cache-to: type=gha,mode=max - name: Update latest branch uses: ad-m/github-push-action@8407731efefc0d8f72af254c74276b7a90be36e1 with: