ci: add registry-based layer caching for Docker builds
Some checks failed
CI / ci (push) Successful in 1m10s
CI / e2e (push) Has been skipped
CI / deploy (push) Failing after 6s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 15:41:33 +02:00
parent 99192fe32f
commit 620c6598cf
2 changed files with 10 additions and 5 deletions

View File

@@ -46,9 +46,12 @@ jobs:
run: | run: |
REGISTRY="gitea.jeanlucmakiola.de" REGISTRY="gitea.jeanlucmakiola.de"
IMAGE="${REGISTRY}/${{ gitea.repository_owner }}/gearbox" IMAGE="${REGISTRY}/${{ gitea.repository_owner }}/gearbox"
docker buildx build -t "${IMAGE}:develop" .
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ gitea.repository_owner }}" --password-stdin echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ gitea.repository_owner }}" --password-stdin
docker push "${IMAGE}:develop" docker buildx build \
--cache-from type=registry,ref=${IMAGE}:buildcache \
--cache-to type=registry,ref=${IMAGE}:buildcache \
-t "${IMAGE}:develop" \
--push .
- name: Trigger Coolify deploy - name: Trigger Coolify deploy
run: | run: |

View File

@@ -90,10 +90,12 @@ jobs:
run: | run: |
REGISTRY="gitea.jeanlucmakiola.de" REGISTRY="gitea.jeanlucmakiola.de"
IMAGE="${REGISTRY}/${{ gitea.repository_owner }}/gearbox" IMAGE="${REGISTRY}/${{ gitea.repository_owner }}/gearbox"
docker buildx build -t "${IMAGE}:${VERSION}" -t "${IMAGE}:latest" .
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ gitea.repository_owner }}" --password-stdin echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ gitea.repository_owner }}" --password-stdin
docker push "${IMAGE}:${VERSION}" docker buildx build \
docker push "${IMAGE}:latest" --cache-from type=registry,ref=${IMAGE}:buildcache \
--cache-to type=registry,ref=${IMAGE}:buildcache \
-t "${IMAGE}:${VERSION}" -t "${IMAGE}:latest" \
--push .
- name: Create Gitea release - name: Create Gitea release
run: | run: |