Skip to content

Commit 5d37d9b

Browse files
Merge pull request #1733 from SaschaSchwarze0/sascha-update-buildkit
Add automation to trigger automatic updates of the BuildKit image in our sample build strategies
2 parents 0e93da8 + 87a9d93 commit 5d37d9b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/check-latest-images.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
include:
1414
- image: gcr.io/kaniko-project/executor
1515
latest-release-url: https://api.github.com/repos/GoogleContainerTools/kaniko/releases/latest
16+
- image: moby/buildkit
17+
latest-release-url: https://api.github.com/repos/moby/buildkit/releases/latest
1618
- image: quay.io/containers/buildah
1719
latest-release-url: https://quay.io/api/v1/repository/containers/buildah/tag/
1820
steps:

hack/check-latest-images.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function update() {
3636
echo "[INFO] Processing directory ${DIRECTORY}"
3737

3838
# Search the image URL recursively and parse the current image tag
39-
CURRENT_TAG="$( (grep --no-filename --recursive "${IMAGE}:" "${DIRECTORY}" || true) | head --lines=1 | sed -E "s#.*${IMAGE}:([v\.0-9]*).*?#\1#")"
39+
CURRENT_TAG="$( (grep --no-filename --recursive "${IMAGE}:" "${DIRECTORY}" || true) | head --lines=1 | sed -E "s#.*${IMAGE}:([v\.0-9]*(-rootless)?).*?#\1#")"
4040
if [ "${CURRENT_TAG}" == "" ]; then
4141
echo "[INFO] No image reference found"
4242
return
@@ -50,6 +50,10 @@ function update() {
5050
fi
5151
LATEST_TAG="$(curl --silent --retry 3 "${LATEST_RELEASE_URL}" | jq --raw-output "${QUERY}")"
5252

53+
if [[ ${IMAGE} == *buildkit* ]]; then
54+
LATEST_TAG="${LATEST_TAG}-rootless"
55+
fi
56+
5357
echo "[INFO] Determined latest tag ${LATEST_TAG}"
5458

5559
# Search and modify the image tag with the latest

0 commit comments

Comments
 (0)