mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-07 05:31:38 +01:00
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>
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: docker-dryrun
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
files-changed:
|
|
uses: ./.github/workflows/files-changed.yml
|
|
permissions:
|
|
contents: read
|
|
|
|
container:
|
|
if: needs.files-changed.outputs.docker == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: docker/setup-qemu-action@v3
|
|
- uses: docker/setup-buildx-action@v3
|
|
- name: Build regular container image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64,linux/riscv64
|
|
push: false
|
|
cache-from: type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootful
|
|
- name: Build rootless container image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: false
|
|
platforms: linux/amd64,linux/arm64,linux/riscv64
|
|
file: Dockerfile.rootless
|
|
cache-from: type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootless
|