ci: enhance Docker workflow with ARM64 support and caching

- Add support for `linux/arm64` platform in Docker workflow
- Enable build cache from and to registry in Docker workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2024-06-22 11:04:57 +08:00
parent bfe56a1c59
commit 741442ba9a
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -90,10 +90,12 @@ jobs:
ACTIONS_RUNTIME_TOKEN: "" ACTIONS_RUNTIME_TOKEN: ""
with: with:
context: . context: .
platforms: linux/amd64 platforms: linux/amd64, linux/arm64
file: docker/Dockerfile file: docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker-meta.outputs.tags }} tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }} labels: ${{ steps.docker-meta.outputs.labels }}
provenance: false provenance: false
sbom: false sbom: false
cache-from: type=registry,ref=gitea/example-go:buildcache
cache-to: type=registry,ref=gitea/example-go:buildcache,mode=max