ci: Add scope parameter to cache-{to,from} options
This change fixes an issue where only the latest image cache was available.
This commit is contained in:
@@ -7,6 +7,10 @@ inputs:
|
|||||||
tag:
|
tag:
|
||||||
description: 'A tag of an image'
|
description: 'A tag of an image'
|
||||||
required: true
|
required: true
|
||||||
|
scope:
|
||||||
|
description: 'A cached image scope'
|
||||||
|
required: false
|
||||||
|
default: ${{ runner.arch }}
|
||||||
command:
|
command:
|
||||||
description: 'A command to run in a container'
|
description: 'A command to run in a container'
|
||||||
required: false
|
required: false
|
||||||
@@ -24,7 +28,7 @@ runs:
|
|||||||
file: ${{ inputs.dockerfile }}
|
file: ${{ inputs.dockerfile }}
|
||||||
tags: ${{ inputs.tag }}
|
tags: ${{ inputs.tag }}
|
||||||
load: true
|
load: true
|
||||||
cache-from: type=gha
|
cache-from: type=gha,scope=${{ inputs.scope }}
|
||||||
|
|
||||||
- uses: docker/build-push-action@v5
|
- uses: docker/build-push-action@v5
|
||||||
id: retry_builder
|
id: retry_builder
|
||||||
@@ -34,7 +38,7 @@ runs:
|
|||||||
file: ${{ inputs.dockerfile }}
|
file: ${{ inputs.dockerfile }}
|
||||||
tags: ${{ inputs.tag }}
|
tags: ${{ inputs.tag }}
|
||||||
load: true
|
load: true
|
||||||
cache-from: type=gha
|
cache-from: type=gha,scope=${{ inputs.scope }}
|
||||||
|
|
||||||
- # Workaround for https://github.com/google/sanitizers/issues/1614 .
|
- # Workaround for https://github.com/google/sanitizers/issues/1614 .
|
||||||
# The underlying issue has been fixed in clang 18.1.3.
|
# The underlying issue has been fixed in clang 18.1.3.
|
||||||
|
|||||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -71,8 +71,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
file: ./ci/linux-debian.Dockerfile
|
file: ./ci/linux-debian.Dockerfile
|
||||||
tags: ${{ matrix.arch }}-debian-image
|
tags: ${{ matrix.arch }}-debian-image
|
||||||
cache-from: type=gha
|
cache-from: type=gha,scope=${{ runner.arch }}
|
||||||
cache-to: type=gha,mode=min
|
cache-to: type=gha,scope=${{ runner.arch }},mode=min
|
||||||
|
|
||||||
x86_64-debian:
|
x86_64-debian:
|
||||||
name: "x86_64: Linux (Debian stable)"
|
name: "x86_64: Linux (Debian stable)"
|
||||||
|
|||||||
Reference in New Issue
Block a user