mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Add Docker build caching to production workflow
This commit is contained in:
parent
3832530587
commit
ff69202426
1 changed files with 9 additions and 0 deletions
|
|
@ -59,6 +59,9 @@ jobs:
|
|||
run: |
|
||||
echo "VERSION=$(docker run --rm -v "$(pwd):/app" -w /app php:8.2-alpine3.16 php bootstrap/getVersion.php)"|xargs >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and Push Image (${{ matrix.arch }})
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
|
@ -69,6 +72,12 @@ jobs:
|
|||
tags: |
|
||||
${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-${{ matrix.arch }}
|
||||
${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-${{ matrix.arch }}
|
||||
cache-from: |
|
||||
type=gha,scope=prod-build-${{ matrix.arch }}
|
||||
type=registry,ref=${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:prod-buildcache-${{ matrix.arch }}
|
||||
cache-to: |
|
||||
type=gha,mode=max,scope=prod-build-${{ matrix.arch }}
|
||||
type=registry,ref=${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:prod-buildcache-${{ matrix.arch }},mode=max
|
||||
|
||||
merge-manifest:
|
||||
runs-on: ubuntu-24.04
|
||||
|
|
|
|||
Loading…
Reference in a new issue