chore: Update Docker cache configuration in CI workflow
### Summary of Changes - Changed the caching strategy in the CI workflow for Docker builds to use the registry for cache references instead of GitHub Actions cache. - Updated cache-from and cache-to parameters for api-gateway, service-adapters, api-docs, and frontend to improve build performance and consistency. ### Expected Results - Enhanced Docker build efficiency by utilizing a more reliable caching mechanism, leading to faster build times and reduced resource usage.
This commit is contained in:
@@ -57,8 +57,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/api-gateway:${{ steps.meta.outputs.version }}
|
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/api-gateway:${{ steps.meta.outputs.version }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha,scope=api-gateway
|
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/api-gateway:cache
|
||||||
cache-to: type=gha,mode=max,scope=api-gateway
|
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/api-gateway:cache,mode=max
|
||||||
|
|
||||||
- name: Build and push Service Adapters
|
- name: Build and push Service Adapters
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@@ -68,8 +68,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/service-adapters:${{ steps.meta.outputs.version }}
|
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/service-adapters:${{ steps.meta.outputs.version }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha,scope=service-adapters
|
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/service-adapters:cache
|
||||||
cache-to: type=gha,mode=max,scope=service-adapters
|
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/service-adapters:cache,mode=max
|
||||||
|
|
||||||
- name: Build and push API Docs
|
- name: Build and push API Docs
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@@ -79,8 +79,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/api-docs:${{ steps.meta.outputs.version }}
|
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/api-docs:${{ steps.meta.outputs.version }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha,scope=api-docs
|
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/api-docs:cache
|
||||||
cache-to: type=gha,mode=max,scope=api-docs
|
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/api-docs:cache,mode=max
|
||||||
|
|
||||||
- name: Build and push Frontend
|
- name: Build and push Frontend
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@@ -90,5 +90,5 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/frontend:${{ steps.meta.outputs.version }}
|
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/frontend:${{ steps.meta.outputs.version }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha,scope=frontend
|
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/frontend:cache
|
||||||
cache-to: type=gha,mode=max,scope=frontend
|
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/frontend:cache,mode=max
|
||||||
|
|||||||
Reference in New Issue
Block a user