From 24215386777d59d65d641ceef52c198e2875e253 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sat, 11 Oct 2025 13:51:10 +0200 Subject: [PATCH] add cache-to and from directives --- .github/workflows/release-nightly.yml | 8 ++++---- .github/workflows/release-tag-rc.yml | 2 ++ .github/workflows/release-tag-version.yml | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 4e20392702..e6a2017068 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -65,10 +65,6 @@ jobs: # fetch all commits instead of only the last as some branches are long lived and could have many between versions # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 - run: git fetch --unshallow --quiet --tags --force - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - check-latest: true - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - name: Get cleaned branch name @@ -118,6 +114,8 @@ jobs: push: true tags: ${{ steps.meta_rootless.outputs.tags }} annotations: ${{ steps.meta_rootless.outputs.annotations }} + cache-to: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache,mode=max + cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache - name: build rootless docker image uses: docker/build-push-action@v5 with: @@ -127,3 +125,5 @@ jobs: file: Dockerfile.rootless tags: ${{ steps.meta_rootless.outputs.tags }} annotations: ${{ steps.meta_rootless.outputs.annotations }} + cache-to: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache,mode=max + cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache diff --git a/.github/workflows/release-tag-rc.yml b/.github/workflows/release-tag-rc.yml index 98a2950e3b..73551628b1 100644 --- a/.github/workflows/release-tag-rc.yml +++ b/.github/workflows/release-tag-rc.yml @@ -124,6 +124,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} annotations: ${{ steps.meta.outputs.annotations }} + cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache - name: build rootless container image uses: docker/build-push-action@v5 with: @@ -133,3 +134,4 @@ jobs: file: Dockerfile.rootless tags: ${{ steps.meta_rootless.outputs.tags }} annotations: ${{ steps.meta_rootless.outputs.annotations }} + cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache diff --git a/.github/workflows/release-tag-version.yml b/.github/workflows/release-tag-version.yml index 58c95458ea..eb16867150 100644 --- a/.github/workflows/release-tag-version.yml +++ b/.github/workflows/release-tag-version.yml @@ -137,6 +137,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} annotations: ${{ steps.meta.outputs.annotations }} + cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache - name: build rootless container image uses: docker/build-push-action@v5 with: @@ -146,3 +147,4 @@ jobs: file: Dockerfile.rootless tags: ${{ steps.meta_rootless.outputs.tags }} annotations: ${{ steps.meta_rootless.outputs.annotations }} + cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache