Skip to content

Commit

Permalink
build: specify arm versions, load example image
Browse files Browse the repository at this point in the history
  • Loading branch information
autumnjolitz committed Dec 16, 2024
1 parent 499a720 commit 3010dc8
Showing 1 changed file with 48 additions and 9 deletions.
57 changes: 48 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
with:
platforms: |
linux/amd64
linux/arm64
linux/arm64/v7
linux/arm64/v8
context: "."
file: Dockerfile.alpine
Expand All @@ -94,10 +94,9 @@ jobs:
with:
platforms: |
linux/amd64
linux/arm64
linux/arm64/v7
linux/arm64/v8
context: "."
load: true
file: Dockerfile.alpine
# target: distroless-python
cache-from: |
Expand All @@ -112,17 +111,57 @@ jobs:
BUILD_ROOT=/d
tags: "${{ steps.image_env.outputs.IMAGE_TAG }}"

-
name: buildroot-example
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: "."
load: true
file: Dockerfile.alpine
target: buildroot
# cache-from: |
# type=registry,ref=${{ steps.image_env.outputs.IMAGE_TAG }}-buildroot
# type=registry,ref=${{ steps.image_env.outputs.SOURCE_IMAGE }}@${{ steps.image_env.outputs.BASE_IMAGE_DIGEST }}
build-args: |
ALPINE_VERSION=${{ steps.image_env.outputs.ALPINE_VERSION }}
BASE_IMAGE_DIGEST=${{ steps.image_env.outputs.BASE_IMAGE_DIGEST }}
PYTHON_VERSION=${{ steps.image_env.outputs.PYTHON_VERSION }}
SOURCE_IMAGE=${{ steps.image_env.outputs.SOURCE_IMAGE }}
BUILD_ROOT=/d
tags: "${{ steps.image_env.outputs.IMAGE_TAG }}-buildroot"
-
name: distroless-example
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
load: true
context: "."
file: Dockerfile.alpine
# target: distroless-python
# cache-from: |
# type=registry,ref=${{ steps.image_env.outputs.IMAGE_TAG }}
# type=registry,ref=${{ steps.image_env.outputs.IMAGE_TAG }}-buildroot
# type=registry,ref=${{ steps.image_env.outputs.SOURCE_IMAGE }}@${{ steps.image_env.outputs.BASE_IMAGE_DIGEST }}
build-args: |
ALPINE_VERSION=${{ steps.image_env.outputs.ALPINE_VERSION }}
BASE_IMAGE_DIGEST=${{ steps.image_env.outputs.BASE_IMAGE_DIGEST }}
PYTHON_VERSION=${{ steps.image_env.outputs.PYTHON_VERSION }}
SOURCE_IMAGE=${{ steps.image_env.outputs.SOURCE_IMAGE }}
BUILD_ROOT=/d
tags: "${{ steps.image_env.outputs.IMAGE_TAG }}"

-
name: examples/simple-flask
uses: docker/build-push-action@v6
with:
context: "examples/simple-flask"
platforms: linux/amd64
load: true
cache-from: |
type=registry,ref=${{ steps.image_env.outputs.IMAGE_TAG }}
type=registry,ref=${{ steps.image_env.outputs.IMAGE_TAG }}-buildroot
type=registry,ref=${{ steps.image_env.outputs.SOURCE_IMAGE }}@${{ steps.image_env.outputs.BASE_IMAGE_DIGEST }}
# cache-from: |
# type=registry,ref=${{ steps.image_env.outputs.IMAGE_TAG }}
# type=registry,ref=${{ steps.image_env.outputs.IMAGE_TAG }}-buildroot
# type=registry,ref=${{ steps.image_env.outputs.SOURCE_IMAGE }}@${{ steps.image_env.outputs.BASE_IMAGE_DIGEST }}
build-args: |
SOURCE_IMAGE=${{ steps.image_env.outputs.IMAGE_TAG }}
tags: "${{ steps.image_env.outputs.IMAGE_TAG }}-example1-amd64"
Expand Down Expand Up @@ -151,7 +190,7 @@ jobs:
push: true
platforms: |
linux/amd64
linux/arm64
linux/arm64/v7
linux/arm64/v8
context: "."
file: Dockerfile.alpine
Expand All @@ -176,7 +215,7 @@ jobs:
context: "."
platforms: |
linux/amd64
linux/arm64
linux/arm64/v7
linux/arm64/v8
file: Dockerfile.alpine
cache-from: |
Expand Down

0 comments on commit 3010dc8

Please sign in to comment.