From 3f3e486b1e388907405ea5f64024c329c5795a2f Mon Sep 17 00:00:00 2001 From: Max Larsson Date: Wed, 18 Sep 2024 20:31:10 -0400 Subject: [PATCH] Add Docker caching --- .github/workflows/fill_station_build_and_push.yml | 4 +++- .github/workflows/ground_server_build_and_push.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fill_station_build_and_push.yml b/.github/workflows/fill_station_build_and_push.yml index edd8883..6da72ba 100644 --- a/.github/workflows/fill_station_build_and_push.yml +++ b/.github/workflows/fill_station_build_and_push.yml @@ -52,13 +52,15 @@ jobs: # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. - name: Build and push Fill Station Docker image id: push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . file: fill/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." - name: Generate artifact attestation diff --git a/.github/workflows/ground_server_build_and_push.yml b/.github/workflows/ground_server_build_and_push.yml index 9ad7e4e..f3211a0 100644 --- a/.github/workflows/ground_server_build_and_push.yml +++ b/.github/workflows/ground_server_build_and_push.yml @@ -48,12 +48,14 @@ jobs: # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. - name: Build and push Docker image id: push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ground-server push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." - name: Generate artifact attestation