diff --git a/.github/workflows/publish-keria.yml b/.github/workflows/publish-keria.yml index 2d051da..62f0f7b 100644 --- a/.github/workflows/publish-keria.yml +++ b/.github/workflows/publish-keria.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to Docker Hub uses: docker/login-action@v2 @@ -26,6 +26,18 @@ jobs: with: images: WebOfTrust/keria + - name: Set up Docker buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Cache Docker Layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: keri-${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + keri-${{ runner.os }}-buildx- + - name: Build and push Docker image uses: docker/build-push-action@v3 with: @@ -35,4 +47,11 @@ jobs: tags: | WebOfTrust/keria:${{ github.event.inputs.version }} WebOfTrust/keria:latest - labels: ${{ github.event.inputs.version }} \ No newline at end of file + labels: ${{ github.event.inputs.version }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Move Docker cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache \ No newline at end of file