mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-17 14:24:07 +00:00
Enable docker layer caching for dry-run and nightly container builds (#36738)
Enable Docker BuildKit layer caching for the dry-run and nightly container build workflows using GHCR registry cache. - **Dry-run** (`pull-docker-dryrun.yml`): adds `cache-from`, read-only, PRs can't write cache - **Nightly** (`release-nightly.yml`): adds `cache-from` and `cache-to` to both read and write cach --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2
.github/workflows/pull-docker-dryrun.yml
vendored
2
.github/workflows/pull-docker-dryrun.yml
vendored
@@ -29,6 +29,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64,linux/riscv64
|
platforms: linux/amd64,linux/arm64,linux/riscv64
|
||||||
push: false
|
push: false
|
||||||
|
cache-from: type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootful
|
||||||
- name: Build rootless container image
|
- name: Build rootless container image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -36,3 +37,4 @@ jobs:
|
|||||||
push: false
|
push: false
|
||||||
platforms: linux/amd64,linux/arm64,linux/riscv64
|
platforms: linux/amd64,linux/arm64,linux/riscv64
|
||||||
file: Dockerfile.rootless
|
file: Dockerfile.rootless
|
||||||
|
cache-from: type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootless
|
||||||
|
|||||||
4
.github/workflows/release-nightly.yml
vendored
4
.github/workflows/release-nightly.yml
vendored
@@ -120,6 +120,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
annotations: ${{ steps.meta.outputs.annotations }}
|
annotations: ${{ steps.meta.outputs.annotations }}
|
||||||
|
cache-from: type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootful
|
||||||
|
cache-to: type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootful,mode=max
|
||||||
- name: build rootless docker image
|
- name: build rootless docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -129,3 +131,5 @@ jobs:
|
|||||||
file: Dockerfile.rootless
|
file: Dockerfile.rootless
|
||||||
tags: ${{ steps.meta_rootless.outputs.tags }}
|
tags: ${{ steps.meta_rootless.outputs.tags }}
|
||||||
annotations: ${{ steps.meta_rootless.outputs.annotations }}
|
annotations: ${{ steps.meta_rootless.outputs.annotations }}
|
||||||
|
cache-from: type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootless
|
||||||
|
cache-to: type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootless,mode=max
|
||||||
|
|||||||
Reference in New Issue
Block a user