diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index 7307d9a7..ac3575ff 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -47,6 +47,11 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=ref,event=pr + type=ref,event=branch + type=sha,format=long - name: Prepare Docker build run: mkdir target && make build @@ -56,6 +61,8 @@ jobs: with: context: . push: ${{ github.event_name != 'pull_request' }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache + cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64