diff --git a/.github/workflows/mainDeploy.yml b/.github/workflows/mainDeploy.yml index a233c13..ddcc10a 100644 --- a/.github/workflows/mainDeploy.yml +++ b/.github/workflows/mainDeploy.yml @@ -118,10 +118,19 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build and push - run: | - docker compose build - docker compose push + - name: Cache Docker layers + uses: docker/bake-action@master + with: + push: true + load: true + files: |- + docker-compose.yml + docker-compose-cache.json + + # - name: Build and push + # run: | + # docker compose build + # docker compose push - name: Pull and restart Docker Container uses: appleboy/ssh-action@master diff --git a/docker-compose-cache.json b/docker-compose-cache.json new file mode 100644 index 0000000..85fb1ad --- /dev/null +++ b/docker-compose-cache.json @@ -0,0 +1,26 @@ +{ + "target": { + "client": { + "cache-from": [ + "type=gha,scope=ISTTP/K-KOO/client" + ], + "cache-to": [ + "type=gha,mode=max,scope=ISTTP/K-KOO/client" + ], + "output": [ + "type=docker" + ] + }, + "server": { + "cache-from": [ + "type=gha,scope=ISTTP/K-KOO/server" + ], + "cache-to": [ + "type=gha,mode=max,scope=ISTTP/K-KOO/server" + ], + "output": [ + "type=docker" + ] + } + } +}