|
|
@@ -54,6 +54,14 @@ jobs:
|
|
|
- name: Set up Docker Buildx
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
+ - name: Cache Docker layers
|
|
|
+ uses: actions/cache@v2
|
|
|
+ with:
|
|
|
+ path: /tmp/.buildx-cache
|
|
|
+ key: ${{ runner.os }}-buildx-slackbot-proxy-${{ github.sha }}
|
|
|
+ restore-keys: |
|
|
|
+ ${{ runner.os }}-buildx-slackbot-proxy-
|
|
|
+
|
|
|
- name: Build and push
|
|
|
uses: docker/build-push-action@v2
|
|
|
with:
|
|
|
@@ -61,8 +69,14 @@ jobs:
|
|
|
file: ./packages/slackbot-proxy/docker/Dockerfile
|
|
|
platforms: linux/amd64
|
|
|
push: true
|
|
|
+ cache-from: type=local,src=/tmp/.buildx-cache
|
|
|
+ cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
|
|
+ - name: Move cache
|
|
|
+ run: |
|
|
|
+ rm -rf /tmp/.buildx-cache
|
|
|
+ mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
|
|
|
|
|
- name: Update Docker Hub Description
|
|
|
uses: peter-evans/dockerhub-description@v2
|