[build] Use registry cache to speed up container image builds

Use the registry cache as described here:
- https://docs.docker.com/build/ci/github-actions/cache/
- https://docs.docker.com/build/cache/
This commit is contained in:
Suresh Sundriyal 2023-07-09 05:50:04 -07:00
parent 22d4d6242d
commit 8628bba7e5

View File

@ -15,6 +15,8 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
env:
CONTAINER_TAG: tstack/lnav-build:latest
steps:
-
name: checkout code
@ -38,4 +40,6 @@ jobs:
context: ${{ github.workspace }}/.github/actions/muslbuilder/
platforms: linux/amd64, linux/arm/v7, linux/arm64
push: true
tags: tstack/lnav-build:latest
tags: ${{ env.CONTAINER_TAG }}
cache-from: type=registry,ref=${{ env.CONTAINER_TAG }}-buildcache
cache-to: type=registry,ref=${{ env.CONTAINER_TAG }}-buildcache,mode=max