Skip to content

Commit ab97c67

Browse files
authored
fix: remove comments from multi-line command (#4)
* fix: remove comments from multi-line command * chore: improve outputs
1 parent c179c50 commit ab97c67

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ All subsequent tasks must use this value to ensure consistency.
3636
3737
#### Inputs
3838

39-
- `image-name`
40-
- `image-index-manifest-tag`
39+
- `image-name` (eg: `kafka`)
40+
- `image-index-manifest-tag` (eg: `3.4.1-stackable0.0.0-dev`)
4141
- `container-file` (defaults to `Dockerfile`)
4242
- `build-context` (defaults to `.`)
4343
<!--
@@ -48,7 +48,9 @@ TODO (@NickLarsenNZ): Allow optional buildx cache
4848

4949
#### Outputs
5050

51-
- `image-manifest-tag`
51+
- `image-repository-uri` (eg: `localhost/kafka`)
52+
- `image-manifest-tag` (eg: `3.4.1-stackable0.0.0-dev-amd64`)
53+
- `image-manifest-uri` (eg: `localhost/kafka:3.4.1-stackable0.0.0-dev-amd64`)
5254

5355
[build-container-image]: ./build-container-image/action.yml
5456

build-container-image/action.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,20 @@ inputs:
2525
# description: Build cache password
2626
# required: true
2727
outputs:
28+
image-repository-uri:
29+
description: |
30+
The locally tagged name of the image, for example: `localhost/kafka`
31+
value: ${{ steps.build-image.outputs.IMAGE_REPOSITORY_URI }}
2832
image-manifest-tag:
2933
description: |
3034
Human-readable tag (usually the version) with architecture information,
3135
for example: `3.4.1-stackable0.0.0-dev-amd64`
3236
value: ${{ steps.build-image.outputs.IMAGE_MANIFEST_TAG }}
37+
image-manifest-uri:
38+
description: |
39+
The full image manifest uri, for example:
40+
localhost/kafka:3.4.1-stackable0.0.0-dev-amd64
41+
value: ${{ steps.build-image.outputs.IMAGE_MANIFEST_URI }}
3342
runs:
3443
using: composite
3544
steps:
@@ -78,11 +87,15 @@ runs:
7887
IMAGE_MANIFEST_TAG="${IMAGE_INDEX_MANIFEST_TAG}-${IMAGE_ARCH}"
7988
echo "IMAGE_MANIFEST_TAG=${IMAGE_MANIFEST_TAG}" | tee -a $GITHUB_OUTPUT
8089
90+
IMAGE_REPOSITORY_URI="localhost/${IMAGE_NAME}"
91+
echo "IMAGE_REPOSITORY_URI=${IMAGE_REPOSITORY_URI}" | tee -a $GITHUB_OUTPUT
92+
93+
IMAGE_MANIFEST_URI="${IMAGE_REPOSITORY_URI}:${IMAGE_MANIFEST_TAG}"
94+
echo "IMAGE_MANIFEST_URI=${IMAGE_MANIFEST_URI}" | tee -a $GITHUB_OUTPUT
95+
96+
# TODO (@NickLarsenNZ): Allow optional buildx cache
8197
docker buildx build \
8298
--file "${CONTAINER_FILE}" \
8399
--platform "linux/${IMAGE_ARCH}" \
84-
--tag "localhost/${IMAGE_NAME}:${IMAGE_MANIFEST_TAG}" \
85-
# TODO (@NickLarsenNZ): Allow optional buildx cache
86-
# --cache-to ... \
87-
# --cache-from ... \
100+
--tag "${IMAGE_MANIFEST_URI}" \
88101
"${BUILD_CONTEXT}"

0 commit comments

Comments
 (0)