Skip to content

Commit 01e3c0f

Browse files
authored
feat: Add bake-config-file input to build-product-image action (#7)
1 parent 9bd1325 commit 01e3c0f

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

build-product-image/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ localhost/kafka:3.4.1-stackable0.0.0-dev-amd64
4646
- `image-tools-version` (eg: `0.0.13`)
4747
- `build-cache-username` (required) <!-- TODO: make the cache optional -->
4848
- `build-cache-password` (required) <!-- TODO: make the cache optional -->
49+
- `bake-config-file` (defaults to `./conf.py`)
4950

5051
### Outputs
5152

build-product-image/action.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ inputs:
1717
build-cache-password:
1818
description: Build cache password
1919
required: true
20+
bake-config-file:
21+
description: Path to the bake config file, defaults to `./conf.py`
22+
default: ./conf.py
2023
outputs:
2124
image-manifest-tag:
2225
description: |
@@ -53,10 +56,6 @@ runs:
5356
sudo apt update
5457
sudo apt install -y python3
5558
56-
- name: Building ${{ inputs.product-name }}
57-
shell: bash
58-
run: echo ${{ inputs.product-name }}
59-
6059
- name: Install image-tools-stackabletech
6160
shell: bash
6261
run: pip install image-tools-stackabletech==${{ inputs.image-tools-version }}
@@ -69,21 +68,25 @@ runs:
6968
username: ${{ inputs.build-cache-username }}
7069
password: ${{ inputs.build-cache-password }}
7170

72-
- name: Build image using bake
71+
- name: Building ${{ inputs.product-name }} Container Image using bake
7372
env:
74-
IMAGE_REPOSITORY: ${{ inputs.product-name }}
7573
BAKE_PRODUCT_VERSION: ${{ inputs.product-version }}
74+
BAKE_CONFIG_FILE: ${{ inputs.bake-config-file }}
75+
IMAGE_REPOSITORY: ${{ inputs.product-name }}
7676
shell: bash
7777
run: |
7878
set -euo pipefail
7979
IMAGE_ARCH="$(uname -m | sed -e 's#x86_64#amd64#' | sed -e 's#aarch64#arm64#')"
8080
81+
echo "::group::bake"
8182
bake \
82-
--product $IMAGE_REPOSITORY=$BAKE_PRODUCT_VERSION \
83-
--image-version "0.0.0-dev-${IMAGE_ARCH}" \
84-
--architecture "linux/${IMAGE_ARCH}" \
85-
--export-tags-file bake-target-tags \
86-
--cache
83+
--product "$IMAGE_REPOSITORY=$BAKE_PRODUCT_VERSION" \
84+
--image-version "0.0.0-dev-${IMAGE_ARCH}" \
85+
--architecture "linux/${IMAGE_ARCH}" \
86+
--export-tags-file bake-target-tags \
87+
--configuration "$BAKE_CONFIG_FILE" \
88+
--cache
89+
echo "::endgroup::""
8790
8891
- name: Re-tag Image (Temporary)
8992
shell: bash

0 commit comments

Comments
 (0)