Try enable cache for docker

This commit is contained in:
2023-10-07 04:56:23 +00:00
committed by GitHub
parent 06d5dfd70f
commit f0aed5ebbd
2 changed files with 24 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ on:
- 'doc/**'
- docker-compose.yml
- README.md
workflow_dispatch:
concurrency:
group: "docker"
@@ -23,6 +24,9 @@ jobs:
with:
fetch-depth: 0
submodules: true
- name: Get cache key
id: cache_key
run: python3 scripts/get_cache_key.py --docker
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
@@ -37,6 +41,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
cache-from: type=gha,scope=docker-${{ steps.cache_key.outputs.cache_key }}
cache-to: type=gha,mode=max,scope=docker-${{ steps.cache_key.outputs.cache_key }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}