ci: added caching
Build and Deploy / build-docker (push) Has been cancelled Details

This commit is contained in:
antifallobst 2023-10-12 22:33:04 +02:00
parent 57a79f16a5
commit c8a18518a7
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
1 changed files with 15 additions and 0 deletions

View File

@ -14,12 +14,27 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: https://github.com/actions/cache@v3
with:
path: |
/tmp/.buildx-cache.bookworm
/tmp/.buildx-cache.latest
key: ${{ runner.os }}-buildx-${{ gitea.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build - name: Build
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
load: true load: true
tags: nerdcult_frontend:latest tags: nerdcult_frontend:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Rotate the cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Deploy - name: Deploy
run: | run: |
docker stop nerdcult-frontend docker stop nerdcult-frontend