[docker] Use new base image for better caching

This commit is contained in:
Jesse Hills
2024-09-02 18:38:51 +12:00
parent 854bafbd4a
commit 89edd86de9
7 changed files with 50 additions and 191 deletions

View File

@@ -7,11 +7,11 @@ inputs:
target:
description: "Target to build"
required: true
example: "docker"
baseimg:
description: "Base image type"
example: "final / lint"
build_type:
description: "Image type to build"
required: true
example: "docker"
example: "docker / hassio"
suffix:
description: "Suffix to add to tags"
required: true
@@ -55,7 +55,7 @@ runs:
cache-from: type=gha
cache-to: ${{ steps.cache-to.outputs.value }}
build-args: |
BASEIMGTYPE=${{ inputs.baseimg }}
BUILD_TYPE=${{ inputs.build_type }}
BUILD_VERSION=${{ inputs.version }}
outputs: |
type=image,name=ghcr.io/${{ steps.tags.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true
@@ -78,7 +78,7 @@ runs:
cache-from: type=gha
cache-to: ${{ steps.cache-to.outputs.value }}
build-args: |
BASEIMGTYPE=${{ inputs.baseimg }}
BUILD_TYPE=${{ inputs.build_type }}
BUILD_VERSION=${{ inputs.version }}
outputs: |
type=image,name=docker.io/${{ steps.tags.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true

View File

@@ -111,8 +111,8 @@ jobs:
uses: ./.github/actions/build-image
with:
platform: ${{ matrix.platform }}
target: docker
baseimg: docker
target: final
build_type: docker
suffix: ""
version: ${{ needs.init.outputs.tag }}
@@ -120,8 +120,8 @@ jobs:
uses: ./.github/actions/build-image
with:
platform: ${{ matrix.platform }}
target: hassio
baseimg: hassio
target: final
build_type: hassio
suffix: "hassio"
version: ${{ needs.init.outputs.tag }}
@@ -130,7 +130,7 @@ jobs:
with:
platform: ${{ matrix.platform }}
target: lint
baseimg: docker
build_type: docker
suffix: lint
version: ${{ needs.init.outputs.tag }}