From 383617284e6e3ac857e545c21de22004d7f52489 Mon Sep 17 00:00:00 2001 From: Rogee Date: Wed, 26 Aug 2026 15:16:21 +0800 Subject: [PATCH] ci: disable GHA cache on Gitea runners Co-authored-by: multica-agent --- .github/workflows/bridge-proxy.yml | 7 +++++-- .github/workflows/docker-publish.yml | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bridge-proxy.yml b/.github/workflows/bridge-proxy.yml index 464a821..18ac040 100644 --- a/.github/workflows/bridge-proxy.yml +++ b/.github/workflows/bridge-proxy.yml @@ -36,12 +36,15 @@ jobs: with: go-version-file: bridge-proxy/go.mod cache-dependency-path: bridge-proxy/go.mod + cache: ${{ github.server_url == 'https://github.com' }} - name: Test run: go test ./... - name: Set up QEMU uses: docker/setup-qemu-action@v3 + with: + cache-image: ${{ github.server_url == 'https://github.com' }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -75,6 +78,6 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: ${{ github.server_url == 'https://github.com' && 'type=gha' || '' }} + cache-to: ${{ github.server_url == 'https://github.com' && 'type=gha,mode=max' || '' }} platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 2028cf6..7ca1c93 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -24,6 +24,8 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + with: + cache-image: ${{ github.server_url == 'https://github.com' }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -58,6 +60,6 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: ${{ github.server_url == 'https://github.com' && 'type=gha' || '' }} + cache-to: ${{ github.server_url == 'https://github.com' && 'type=gha,mode=max' || '' }} platforms: linux/amd64,linux/arm64