ci: 使用 registry 缓存替代 gha 缓存
Some checks failed
CI / Build Check (pull_request) Failing after 1m28s

Docker 构建缓存改为存储在镜像仓库中,兼容 Gitea Actions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
charilezhou
2026-01-22 18:17:13 +08:00
parent a82144a676
commit c5e08b5632

View File

@@ -45,8 +45,8 @@ jobs:
tags: | tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web:${{ steps.meta.outputs.tag }} ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web:${{ steps.meta.outputs.tag }}
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web:latest ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web:latest
cache-from: type=gha cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web:buildcache
cache-to: type=gha,mode=max cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web:buildcache,mode=max
- name: Build and push API image - name: Build and push API image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
@@ -57,8 +57,8 @@ jobs:
tags: | tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-api:${{ steps.meta.outputs.tag }} ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-api:${{ steps.meta.outputs.tag }}
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-api:latest ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-api:latest
cache-from: type=gha cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-api:buildcache
cache-to: type=gha,mode=max cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-api:buildcache,mode=max
deploy: deploy:
name: Deploy to Knative name: Deploy to Knative