Skip to content

Commit fb257ac

Browse files
fix(ci): drop OCI labels from the pack build
pack build has no --label flag; the buildpacks image carries the lifecycle's metadata labels, as it did under the Maven plugin. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 89046dc commit fb257ac

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,5 @@ jobs:
9696
# renovate: datasource=docker depName=paketobuildpacks/ubuntu-noble-run-tiny
9797
run-image: "paketobuildpacks/ubuntu-noble-run-tiny@sha256:c32333227b6dfbc2a4a93b03ee6d3475cfe152468c7d396bf22f06099bb0ecc9"
9898
registry: "ghcr.io"
99+
# Buildpacks images carry the lifecycle's own metadata labels; pack accepts no OCI labels.
99100
single-arch: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
100-
labels: |
101-
org.opencontainers.image.title=Hephaestus Application Server
102-
org.opencontainers.image.description=Spring Boot server for Hephaestus
103-
org.opencontainers.image.vendor=AET TUM
104-
org.opencontainers.image.licenses=MIT
105-
hephaestus.component=application-server

.github/workflows/reusable-docker-build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,9 @@ jobs:
203203
[[ -n "$PROJECT_DESCRIPTOR" && -n "$RUN_IMAGE" ]]
204204
mapfile -t jars < <(find "$APPLICATION_DIRECTORY" -name 'hephaestus-application-*.jar')
205205
(( ${#jars[@]} == 1 ))
206-
mapfile -t labels < <(jq -r '.labels | to_entries[] | "\(.key)=\(.value)"' <<< "$DOCKER_METADATA_OUTPUT_JSON")
207-
label_args=()
208-
for label in "${labels[@]}"; do label_args+=(--label "$label"); done
209206
PER_ARCH_TAG="$INPUT_REGISTRY/$INPUT_IMAGE_NAME:ci-$GITHUB_RUN_ID-$PLATFORM_PAIR"
210207
pack build "$PER_ARCH_TAG" --path "${jars[0]}" --descriptor "$PROJECT_DESCRIPTOR" \
211-
--run-image "$RUN_IMAGE" --platform "$MATRIX_PLATFORM" --publish --trust-builder \
212-
"${label_args[@]}"
208+
--run-image "$RUN_IMAGE" --platform "$MATRIX_PLATFORM" --publish --trust-builder
213209
# Buildpacks may wrap one platform in an index; capture its manifest, not the wrapper.
214210
RAW=$(docker buildx imagetools inspect "$PER_ARCH_TAG" --format '{{json .Manifest}}')
215211
if echo "$RAW" | jq -e '.manifests' >/dev/null 2>&1; then

0 commit comments

Comments
 (0)