Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ jobs:
# Get all the published targets of the bake group
TARGETS=$(docker buildx bake php${PHP_VERSION//.} --progress=quiet --print | jq -r '.target | to_entries[] | select(.value.tags) | .key')

for TARGET in $TARGETS; do
publish() {
TARGET="$1"
TAG_ORI=$(REPO="ghcr.io/${{ github.repository_owner }}/php" TAG_PREFIX="rc${GITHUB_RUN_ID}-" docker buildx bake ${TARGET} --progress=quiet --print | jq -r ".target | to_entries[] | select(.key == \"${TARGET}\") | .value.tags[0]")
TAG_PATH=$(REPO="php" IS_RELEASE="1" PHP_PATCH_MINOR="${{ env.PHP_PATCH_MINOR }}" docker buildx bake ${TARGET} --progress=quiet --print | jq -r ".target | to_entries[] | select(.key == \"${TARGET}\") | .value.tags[1]")
TAG_MINOR=$(REPO="php" docker buildx bake ${TARGET} --progress=quiet --print | jq -r ".target | to_entries[] | select(.key == \"${TARGET}\") | .value.tags[0]")
Expand All @@ -153,4 +154,7 @@ jobs:
# Create manifest for PHP_VERSION
regctl image copy "${TAG_ORI}" "thecodingmachine/${TAG_MINOR}"
fi
done
}
export -f publish
# 4 targets at the same time
printf '%s\n' $TARGETS | xargs -P 4 -I {} bash -ec 'publish {}'