ci: build-oci-image: cache the docker image build

This wont always speed things up, but occasionally it will speed things
up by a lot
This commit is contained in:
2025-12-12 23:01:18 -06:00
parent 0416d7990d
commit fa18d20427

View File

@@ -61,6 +61,8 @@ jobs:
- name: Set up Docker buildx
if: steps.image-changes.outputs.build_image == 'true'
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=runners-net
- name: Log in to Github Container Registry
if: steps.image-changes.outputs.build_image == 'true'
@@ -77,6 +79,8 @@ jobs:
push: true
tags: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ steps.image-changes.outputs.image_tag }}
context: "{{defaultContext}}:.docker"
cache-from: type=gha
cache-to: type=gha,mode=max
outputs:
image_tag: ${{ steps.image-changes.outputs.image_tag }}