mirror of
https://github.com/yanhao98/docker-example.git
synced 2025-07-13 04:00:47 +08:00
cache-from: type=gha
This commit is contained in:
26
.github/workflows/build-docker-image.yaml
vendored
26
.github/workflows/build-docker-image.yaml
vendored
@ -39,14 +39,14 @@ jobs:
|
|||||||
- 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
|
# - name: Cache Docker layers
|
||||||
uses: actions/cache@v4
|
# uses: actions/cache@v4
|
||||||
with:
|
# with:
|
||||||
path: |
|
# path: |
|
||||||
/tmp/.buildx-cache
|
# /tmp/.buildx-cache
|
||||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
# key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
restore-keys: |
|
# restore-keys: |
|
||||||
${{ runner.os }}-buildx-
|
# ${{ runner.os }}-buildx-
|
||||||
|
|
||||||
- name: Extract metadata
|
- name: Extract metadata
|
||||||
id: meta
|
id: meta
|
||||||
@ -78,12 +78,12 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64, linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
# cache-from: type=gha
|
cache-from: type=gha
|
||||||
# cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
# cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
# cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
Reference in New Issue
Block a user