From 634c667ccd64d03f7af45c44d645a3e49ab50604 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Sun, 22 Jun 2025 11:15:46 +0100 Subject: [PATCH 01/45] chore: fix CI workflow (#1) --- .arg | 3 ++- .github/CODEOWNERS | 4 ++-- .github/workflows/ci.yml | 41 ++++++++++++++++++++++-------------- README.md | 6 +++--- common/Earthfile | 45 +++++++++++++++++++++++++--------------- 5 files changed, 61 insertions(+), 38 deletions(-) diff --git a/.arg b/.arg index 455a198..a9fbc5e 100644 --- a/.arg +++ b/.arg @@ -1,3 +1,4 @@ -DOCKERHUB_USER=earthly +CR_HOST=ghcr.io +CR_ORG=earthbuild IMAGE_NAME=dind EARTHLY_REPO_VERSION=0b28ef80785fd88df1ec7e674475b02e046d5b36 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e2d3d45..231659a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ -# PRs require approval from the earthly core team -* @earthly/core +# PRs require approval from the EarthBuild admin team +* @EarthBuild/fork-admins diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2363f68..63d9827 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,35 +5,46 @@ on: # push: # branches: [ "main" ] pull_request: - branches: [ "main" ] + branches: ["main"] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true - + jobs: test: name: test runs-on: ubuntu-latest + permissions: + contents: read + packages: write env: FORCE_COLOR: 1 EARTHLY_CONVERSION_PARALLELISM: "5" - EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" - EARTHLY_INSTALL_ID: "earthly-dind-githubactions" + EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions" steps: - - uses: earthly/actions/setup-earthly@v1 + # The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects + # the host's IPv6 capability and then requires IPv6 NAT to create networks + # for kind. So we load it here. + # Ref: https://github.com/moby/moby/pull/47062 + - name: Load kernel module IPv6 NAT + run: sudo modprobe ip6table_nat + - name: Set up Docker Hub mirrors + run: | + sudo mkdir -p /etc/docker + echo '{"registry-mirrors": ["https://mirror.gcr.io", "https://public.ecr.aws"]}' | sudo tee /etc/docker/daemon.json + sudo systemctl restart docker + - name: Set up QEMU + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static binfmt-support + sudo update-binfmts --display + - uses: earthbuild/actions-setup@main with: version: v0.8.15 - uses: actions/checkout@v4 - - name: Docker login (non fork only) - run: |- - docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}" - docker login registry-1.docker.io.mirror.corp.earthly.dev --username "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" --password "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}" - if: github.event.pull_request.head.repo.full_name == github.repository - - name: Configure Earthly to use mirror (non fork only) - run: |- - earthly config global.buildkit_additional_config "'[registry.\"docker.io\"] - mirrors = [\"registry-1.docker.io.mirror.corp.earthly.dev\"]'" + - name: Log in to GitHub Container Registry (non fork only) + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin if: github.event.pull_request.head.repo.full_name == github.repository - name: Run tests - run: earthly --ci -P --push --org earthly-technologies --satellite dind +test + run: earthly --ci -P --push +test diff --git a/README.md b/README.md index 11c67ab..dba2302 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ For information on how to use these images, please refer to [docker in earthly]( ## Supported Distributions -There are currently 3 supported dind distributions available: +There are currently 4 supported dind distributions available: - `alpine` - `ubuntu:20.04` - `ubuntu:23.04` @@ -30,7 +30,7 @@ dependencies that will trigger new versions of the dind images such as the docke ```bash . -├── Earthfile // Targets that apply to all images (e.g. +test) +├── Earthfile // Targets that apply to all images (e.g. +test) ├── common │ └── Earthfile // A library of common helper targets └── os // Each directory contains an Earthfile with targets to maintain the specific os (e.g. +test, +build) @@ -65,7 +65,7 @@ earthly --push -P +test #### Community members -Community members do not have permissions to push a built image and run the tests against it. However, they can easily set a different dockerhub repository by changing the `DOCKERHUB_USER` ARG value in [.arg](.arg) to a private repository or by passing the arg in the earthly command, e.g. `earthly --push -P +test --DOCKERHUB_USER=`. +Community members do not have permissions to push a built image and run the tests against it. However, they can easily set a different container registry repository by changing the `CR_HOST` (default: ghcr.io) and `CR_ORG` ARG values in [.arg](.arg) to a private container registry repository or by passing the args in the earthly command, e.g. `earthly --push -P +test --CR_HOST= --CR_ORG=`. ## Deployment diff --git a/common/Earthfile b/common/Earthfile index 9a22e2e..1dc50df 100644 --- a/common/Earthfile +++ b/common/Earthfile @@ -6,14 +6,14 @@ FROM alpine # EARTHLY_REPO_VERSION specifies a branch and/or commit of earthly/earthly (it defaults to the earthly cli version if left empty) ARG EARTHLY_REPO_VERSION -IMPORT github.com/earthly/earthly/buildkitd:$EARTHLY_REPO_VERSION AS earthly -IMPORT github.com/earthly/earthly/tests/with-docker:$EARTHLY_REPO_VERSION AS with-docker -IMPORT github.com/earthly/earthly/tests/with-docker-compose:$EARTHLY_REPO_VERSION AS with-docker-compose -IMPORT github.com/earthly/earthly/tests/with-docker-kind:$EARTHLY_REPO_VERSION AS with-docker-kind -IMPORT github.com/earthly/earthly/tests/dind-auto-install:$EARTHLY_REPO_VERSION AS dind-auto-install +IMPORT github.com/EarthBuild/earthbuild/buildkitd:$EARTHLY_REPO_VERSION AS earthly +IMPORT github.com/EarthBuild/earthbuild/tests/with-docker:$EARTHLY_REPO_VERSION AS with-docker +IMPORT github.com/EarthBuild/earthbuild/tests/with-docker-compose:$EARTHLY_REPO_VERSION AS with-docker-compose +IMPORT github.com/EarthBuild/earthbuild/tests/with-docker-kind:$EARTHLY_REPO_VERSION AS with-docker-kind +IMPORT github.com/EarthBuild/earthbuild/tests/dind-auto-install:$EARTHLY_REPO_VERSION AS dind-auto-install -# DOCKERHUB_USER is the organization name in docker hub (default: earthly) -ARG --global DOCKERHUB_USER +# CR_ORG is the organization name in a container registry (default: earthbuild) +ARG --global CR_ORG # IMAGE_NAME is the image repository in docker hub (default: dind) ARG --global IMAGE_NAME @@ -26,14 +26,22 @@ build: # DOCKER_VERSION is the version of docker to use, e.g. 20.10.14 ARG --required DOCKER_VERSION FROM $OS_IMAGE:$OS_VERSION + # Ubuntu 23.04 has reached EOL + IF [ "$OS_VERSION" = "23.04" ] + RUN sed -i \ + -e 's/archive.ubuntu.com\/ubuntu/old-releases.ubuntu.com\/ubuntu/g' \ + -e 's/ports.ubuntu.com\/ubuntu-ports/old-releases.ubuntu.com\/ubuntu/g' \ + -e 's/security.ubuntu.com\/ubuntu/old-releases.ubuntu.com\/ubuntu/g' \ + /etc/apt/sources.list + END COPY earthly+export-docker-script/docker-auto-install.sh /usr/local/bin/docker-auto-install.sh RUN docker-auto-install.sh LET DOCKER_VERSION_TAG=$DOCKER_VERSION IF [ "$OS_IMAGE" = "alpine" ] RUN apk add iptables-legacy # required for older kernels END - # DOCKERHUB_USER is the organization name in docker hub (default: earthly) - ARG DOCKERHUB_USER + # CR_ORG is the organization name in container registry (default: earthbuild) + ARG CR_ORG # IMAGE_NAME is the image repository in docker hub (default: dind) ARG IMAGE_NAME COPY --dir --pass-args +get-image-info/image-info . @@ -41,7 +49,8 @@ build: LET image_tag=$(cat image-info/tag) RUN rm -rf image-info ENV OTEL_TRACES_EXPORTER=none # disabled for speed improvement; see https://github.com/earthly/earthly/issues/4066 - SAVE IMAGE --push $image_name:$image_tag + ARG --required CR_HOST + SAVE IMAGE --push $CR_HOST/$image_name:$image_tag # get-image-info generates the image name and tag as a saved artifact so it can be used by multiple targets get-image-info: @@ -59,11 +68,12 @@ get-image-info: RUN if echo $DOCKER_VERSION_TAG | grep "[^0-9.-]"; then echo "DOCKER_VERSION_TAG looks bad; got $DOCKER_VERSION_TAG" && exit 1; fi END LET TAG=$OS_IMAGE-$OS_VERSION-docker-$DOCKER_VERSION_TAG - # DOCKERHUB_USER is the organization name in docker hub (default: earthly) - ARG --required DOCKERHUB_USER + # CR_ORG is the organization name in container registry (default: earthbuild) + ARG --required CR_ORG # IMAGE_NAME is the image repository in docker hub (default: dind) ARG --required IMAGE_NAME - LET image_full_name=$DOCKERHUB_USER/$IMAGE_NAME + # image_full_name excludes container registry host + LET image_full_name=$CR_ORG/$IMAGE_NAME ARG SUFFIX IF [ -n "$SUFFIX" ] SET TAG="$TAG-$SUFFIX" @@ -75,7 +85,7 @@ get-image-info: # test runs tests against the specified image (DIND_IMAGE) or otherwise uses the image specified in earthly/earthly repo test: - # DIND_IMAGE is the full docker image name & tag to run the tests against. The image must exist in the remote docker registry + # DIND_IMAGE is the full container image name & tag to run the tests against. The image must exist in the remote container registry ARG DIND_IMAGE BUILD --pass-args with-docker+all --DIND_IMAGE=$DIND_IMAGE BUILD --pass-args dind-auto-install+test --BASE_IMAGE=$DIND_IMAGE @@ -95,11 +105,12 @@ build-and-test: COPY --dir --pass-args +get-image-info/image-info . LET image_name=$(cat image-info/name) LET image_tag=$(cat image-info/tag) + ARG --required CR_HOST WAIT # EARTHLY_PUSH is a builtin arg that helps determine if the tests should run ARG EARTHLY_PUSH IF [ "$EARTHLY_PUSH" = "true" ] - BUILD --pass-args ../os/$DIR_PATH+test --DIND_IMAGE=$image_name:$image_tag + BUILD --pass-args ../os/$DIR_PATH+test --DIND_IMAGE=$CR_HOST/$image_name:$image_tag END END @@ -114,12 +125,12 @@ push-new-tag: exit 1 END END - FROM $DOCKERHUB_USER/$IMAGE_NAME:$TAG_WITH_DATE + FROM $CR_ORG/$IMAGE_NAME:$TAG_WITH_DATE LET new_tag="$(echo ${TAG_WITH_DATE%-*})" IF [ "$new_tag" = "$TAG_WITH_DATE" ] RUN --no-cache echo "failed to remove date from tag $TAG_WITH_DATE" && exit 1 END - SAVE IMAGE --push $DOCKERHUB_USER/$IMAGE_NAME:$new_tag + SAVE IMAGE --push $CR_ORG/$IMAGE_NAME:$new_tag # push-new-tag-multi-platform builds push-new-tag using both amd64 & arm64 platforms. push-new-tag-multi-platform: From df684fa48e3f1f3f69ba599cbc0db62be1d0776d Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Wed, 25 Jun 2025 22:01:11 +0100 Subject: [PATCH 02/45] chore: fix Release workflow (#2) --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 39 ++++++++++++++++++++++++----------- README.md | 18 ++++++++-------- common/Earthfile | 5 +++-- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63d9827..0be996c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: EARTHLY_CONVERSION_PARALLELISM: "5" EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions" steps: + - uses: actions/checkout@v4 # The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects # the host's IPv6 capability and then requires IPv6 NAT to create networks # for kind. So we load it here. @@ -42,7 +43,6 @@ jobs: - uses: earthbuild/actions-setup@main with: version: v0.8.15 - - uses: actions/checkout@v4 - name: Log in to GitHub Container Registry (non fork only) run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin if: github.event.pull_request.head.repo.full_name == github.repository diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63bdd51..736e4c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,25 +9,40 @@ jobs: name: release after merging ${{ github.head_ref }} if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'renovate/') && endsWith(github.head_ref, '-dind-image') runs-on: ubuntu-latest + permissions: + contents: read + packages: write env: FORCE_COLOR: 1 EARTHLY_CONVERSION_PARALLELISM: "5" - EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" - EARTHLY_INSTALL_ID: "earthly-dind-githubactions" + EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions" steps: - - uses: earthly/actions/setup-earthly@v1 + - uses: actions/checkout@v4 + # The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects + # the host's IPv6 capability and then requires IPv6 NAT to create networks + # for kind. So we load it here. + # Ref: https://github.com/moby/moby/pull/47062 + - name: Load kernel module IPv6 NAT + run: sudo modprobe ip6table_nat + - name: Set up Docker Hub mirrors + run: | + sudo mkdir -p /etc/docker + echo '{"registry-mirrors": ["https://mirror.gcr.io", "https://public.ecr.aws"]}' | sudo tee /etc/docker/daemon.json + sudo systemctl restart docker + - name: Set up QEMU + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static binfmt-support + sudo update-binfmts --display + - uses: earthbuild/actions-setup@main with: version: v0.8.15 - - uses: actions/checkout@v4 - - name: Docker login (non fork only) + - name: Log in to container registries (non fork only) run: |- docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}" - docker login registry-1.docker.io.mirror.corp.earthly.dev --username "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" --password "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}" - if: github.event.pull_request.head.repo.full_name == github.repository - - name: Configure Earthly to use mirror (non fork only) - run: |- - earthly config global.buildkit_additional_config "'[registry.\"docker.io\"] - mirrors = [\"registry-1.docker.io.mirror.corp.earthly.dev\"]'" + docker login ghcr.io --username ${{ github.actor }} --password "${{ secrets.GITHUB_TOKEN }}" if: github.event.pull_request.head.repo.full_name == github.repository - name: Build & Push image - run: earthly --ci -P --push --org earthly-technologies --satellite dind +release --RENOVATE_BRANCH=${{github.head_ref}} + run: | + earthly --ci -P --push +release --RENOVATE_BRANCH=${{github.head_ref}} # default:ghcr.io + earthly --ci -P --push +release --RENOVATE_BRANCH=${{github.head_ref}} --CR_HOST=docker.io diff --git a/README.md b/README.md index dba2302..8062eae 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Earthly dind (Docker In Docker) Images -[![Release](https://github.com/earthly/dind/actions/workflows/release.yml/badge.svg)](https://github.com/earthly/dind/actions/workflows/release.yml) -![Docker Pulls](https://img.shields.io/docker/pulls/earthly/dind) +# EarthBuild dind (Docker In Docker) Images +[![Release](https://github.com/earthbuild/dind/actions/workflows/release.yml/badge.svg)](https://github.com/earthbuild/dind/actions/workflows/release.yml) +![Docker Pulls](https://img.shields.io/docker/pulls/earthbuild/dind) -Earthly's official [earthly/dind](https://hub.docker.com/repository/docker/earthly/dind/general) docker images. -For information on how to use these images, please refer to [docker in earthly](https://docs.earthly.dev/docs/guides/docker-in-earthly). +EarthBuilds's official [ghcr.io/earthbuild/dind](https://ghcr.io/earthbuild/dind) and [earthbuild/dind](https://hub.docker.com/r/earthlbuild/dind) container images. +For information on how to use these images, please refer to [docker in EarthBuild](https://docs.earthly.dev/docs/guides/docker-in-earthly). ## Supported Distributions @@ -19,7 +19,7 @@ Other distributions and/or base images can be used with our [dind+INSTALL](https ## How Images are Built In this repository, we maintain the OS & Docker versions that warrants releasing a new version of the image. -However, the installations of docker and other dependencies are done via an installation script that is currently maintained in [earthly/earthly](https://github.com/earthly/earthly). +However, the installations of docker and other dependencies are done via an installation script that is currently maintained in [earthbuild/earthbuild](https://github.com/earthbuild/earthbuild). ### Dependencies @@ -46,7 +46,7 @@ dependencies that will trigger new versions of the dind images such as the docke ## Testing -Images are tested by running remote test targets that are maintained in [earthly/earthly](https://github.com/earthly/earthly/tree/main/tests/with-docker). This is because these tests also help test [WITH DOCKER](https://docs.earthly.dev/docs/earthfile#with-docker) command in earthly cli. +Images are tested by running remote test targets that are maintained in [earthbuild/earthbuild](https://github.com/earthbuild/earthbuild/tree/main/tests/with-docker). This is because these tests also help test [WITH DOCKER](https://docs.earthly.dev/docs/earthfile#with-docker) command in earthly cli. Temporary images are built, pushed, and pulled as part of the test cycle. @@ -69,11 +69,11 @@ Community members do not have permissions to push a built image and run the test ## Deployment -When the relevant dependencies are updates by Renovate, new images/tags will be pushed automatically to the docker registry. +When the relevant dependencies are updated by Renovate, new images/tags will be pushed automatically to the container registries - [ghcr.io/earthbuild/dind](https://ghcr.io/earthbuild/dind) and [earthbuild/dind](https://hub.docker.com/r/earthlbuild/dind). ## Contributing -* Please report bugs as [GitHub issues](https://github.com/earthly/dind/issues). +* Please report bugs as [GitHub issues](https://github.com/earthbuild/dind/issues). * Join us on [Slack](https://earthly.dev/slack)! * Questions via GitHub issues are welcome! * PRs welcome! But please give a heads-up in a GitHub issue before starting work. If there is no GitHub issue for what you want to do, please create one. diff --git a/common/Earthfile b/common/Earthfile index 1dc50df..8b415d7 100644 --- a/common/Earthfile +++ b/common/Earthfile @@ -125,12 +125,13 @@ push-new-tag: exit 1 END END - FROM $CR_ORG/$IMAGE_NAME:$TAG_WITH_DATE + ARG --required CR_HOST + FROM $CR_HOST/$CR_ORG/$IMAGE_NAME:$TAG_WITH_DATE LET new_tag="$(echo ${TAG_WITH_DATE%-*})" IF [ "$new_tag" = "$TAG_WITH_DATE" ] RUN --no-cache echo "failed to remove date from tag $TAG_WITH_DATE" && exit 1 END - SAVE IMAGE --push $CR_ORG/$IMAGE_NAME:$new_tag + SAVE IMAGE --push $CR_HOST/$CR_ORG/$IMAGE_NAME:$new_tag # push-new-tag-multi-platform builds push-new-tag using both amd64 & arm64 platforms. push-new-tag-multi-platform: From 4ec0d0be01d917050cda037ac7995768a9733e9a Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Wed, 2 Jul 2025 20:29:43 +0100 Subject: [PATCH 03/45] chore: fix renovate (#3) --- .github/renovate.json5 | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index a10c498..bca5548 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -6,7 +6,8 @@ configMigration: true, prHourlyLimit: 1, schedule: [ // utc timezone - 'after 6am on monday', + // TODO(jhorsts): uncomment when workflows work as expected + // 'after 6am on monday', ], enabledManagers: [ 'dockerfile', @@ -20,15 +21,15 @@ }, customManagers: [ { - // Earthly Version in GH Actions + // Earthbuild Version in GH Actions customType: 'regex', fileMatch: [ - '.*?\\.yml', + '.*?\\.yml', ], matchStrings: [ - '- uses: earthly/actions/setup-earthly@.*?[\\s\\n]+.*?[\\s\\n]+with:[\\s\\n]*version: (?.*?)[\\s\\n/]+', + '- uses: earthbuild/actions-setup@.*?[\\s\\n]+.*?[\\s\\n]+with:[\\s\\n]*version: (?.*?)[\\s\\n/]+', ], - depNameTemplate: 'earthly/earthly', + depNameTemplate: 'earthbuild/earthbuild', datasourceTemplate: 'github-releases', }, { @@ -57,15 +58,15 @@ autoReplaceStringTemplate: '# renovate: datasource=repology depName=alpine_{{{newMajor}}}_{{{newMinor}}}', }, { - // Updating the commit hash of earthly/earthly + // Updating the commit hash of earthbuild/earthbuild customType: 'regex', fileMatch: ['^\\.arg$'], matchStrings: [ 'EARTHLY_REPO_VERSION=(?.*?)($|\\s|\\n)', ], currentValueTemplate: 'main', - depNameTemplate: 'earthly/earthly', - packageNameTemplate: 'https://github.com/earthly/earthly', + depNameTemplate: 'earthbuild/earthbuild', + packageNameTemplate: 'https://github.com/earthbuild/earthbuild', datasourceTemplate: 'git-refs', }, { @@ -76,7 +77,7 @@ matchStrings: [ '\\*\\s+\\`(?.+?)\\`\\n', ], - depNameTemplate: 'earthly/dind', + depNameTemplate: 'earthbuild/dind', datasourceTemplate: 'docker', }, ], @@ -110,33 +111,33 @@ automerge: true, }, { - // rule to update earthly/dind:alpine-* images + // rule to update earthbuild/dind:alpine-* images groupName: 'docs-dind-images', - matchPackageNames: ['earthly/dind'], + matchPackageNames: ['earthbuild/dind'], matchCurrentVersion: "/^alpine-.*/", allowedVersions: "/^alpine-.*/", versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-r(?\\d+)$", }, { - // rule to update earthly/dind:ubuntu:20.04-* images + // rule to update earthbuild/dind:ubuntu:20.04-* images groupName: 'docs-dind-images', - matchPackageNames: ['earthly/dind'], + matchPackageNames: ['earthbuild/dind'], matchCurrentVersion: "/^ubuntu-20\\.04-.*/", allowedVersions: "/^ubuntu-20\\.04-.*/", versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$", }, { - // rule to update earthly/dind:ubuntu:23.04-* images + // rule to update earthbuild/dind:ubuntu:23.04-* images groupName: 'docs-dind-images', - matchPackageNames: ['earthly/dind'], + matchPackageNames: ['earthbuild/dind'], matchCurrentVersion: "/^ubuntu-23\\.04-.*/", allowedVersions: "/^ubuntu-23\\.04-.*/", versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$", }, { - // rule to update earthly/dind:ubuntu:24.04-* images + // rule to update earthbuild/dind:ubuntu:24.04-* images groupName: 'docs-dind-images', - matchPackageNames: ['earthly/dind'], + matchPackageNames: ['earthbuild/dind'], matchCurrentVersion: "/^ubuntu-24\\.04-.*/", allowedVersions: "/^ubuntu-24\\.04-.*/", versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$", From 8759b139833adcb6f2e71de62c59a7aba208a201 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Thu, 3 Jul 2025 08:23:56 +0100 Subject: [PATCH 04/45] chore(renovate): enable forkProcessing (#4) --- .github/renovate.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index bca5548..7eafd6a 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -3,6 +3,7 @@ extends: [ "config:recommended" ], + forkProcessing: "enabled", configMigration: true, prHourlyLimit: 1, schedule: [ // utc timezone From fcc8111a0b37a424c82cdb8cfba4a48c1e3cf7e1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:21:41 +0000 Subject: [PATCH 05/45] chore(deps): update earthbuild/earthbuild digest to c10f2cf (#5) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index a9fbc5e..355e4e9 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=0b28ef80785fd88df1ec7e674475b02e046d5b36 +EARTHLY_REPO_VERSION=c10f2cffa9a7020bc6f3c9fbb88fb89c66adf8bd From d87c1db768b99593dc80e01d3b70797040be356a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 19:59:03 +0100 Subject: [PATCH 06/45] chore(config): migrate config .github/renovate.json5 (#6) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Janis Horsts --- .github/renovate.json5 | 100 ++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 7eafd6a..f1a8411 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,31 +1,27 @@ { - $schema: "https://docs.renovatebot.com/renovate-schema.json", + $schema: 'https://docs.renovatebot.com/renovate-schema.json', extends: [ - "config:recommended" + 'config:recommended', ], - forkProcessing: "enabled", + forkProcessing: 'enabled', configMigration: true, prHourlyLimit: 1, - schedule: [ // utc timezone - // TODO(jhorsts): uncomment when workflows work as expected - // 'after 6am on monday', - ], + schedule: [], enabledManagers: [ 'dockerfile', 'custom.regex', 'github-actions', ], dockerfile: { - fileMatch: [ - 'Earthfile', + managerFilePatterns: [ + '/Earthfile/', ], }, customManagers: [ { - // Earthbuild Version in GH Actions customType: 'regex', - fileMatch: [ - '.*?\\.yml', + managerFilePatterns: [ + '/.*?\\.yml/', ], matchStrings: [ '- uses: earthbuild/actions-setup@.*?[\\s\\n]+.*?[\\s\\n]+with:[\\s\\n]*version: (?.*?)[\\s\\n/]+', @@ -34,20 +30,18 @@ datasourceTemplate: 'github-releases', }, { - // ARG/LET in Earthfile that have a Renovate comment customType: 'regex', - fileMatch: [ - 'Earthfile', + managerFilePatterns: [ + '/Earthfile/', ], matchStrings: [ '\\s*#\\s*renovate:\\s*datasource=(?.*?)\\s+depName=(?.*?)[\\s\\n]+(versioning=(?.*?)\\s+)?(ARG|LET)\\s+.*?(_VERSION|_VER|version)=(?.*?)($|\\s|\\n)', ], }, { - // Updating the Repology alpine version customType: 'regex', - fileMatch: [ - 'Earthfile', + managerFilePatterns: [ + '/Earthfile/', ], matchStrings: [ '# renovate: datasource=repology depName=alpine_(?\\d+_\\d+)', @@ -59,9 +53,10 @@ autoReplaceStringTemplate: '# renovate: datasource=repology depName=alpine_{{{newMajor}}}_{{{newMinor}}}', }, { - // Updating the commit hash of earthbuild/earthbuild customType: 'regex', - fileMatch: ['^\\.arg$'], + managerFilePatterns: [ + '/^\\.arg$/', + ], matchStrings: [ 'EARTHLY_REPO_VERSION=(?.*?)($|\\s|\\n)', ], @@ -72,8 +67,8 @@ }, { customType: 'regex', - fileMatch: [ - 'docs/dockerhub.md$', + managerFilePatterns: [ + '/docs/dockerhub.md$/', ], matchStrings: [ '\\*\\s+\\`(?.+?)\\`\\n', @@ -86,14 +81,8 @@ 'renovate', ], packageRules: [ - // set the group name for alpine dind dependencies { groupName: "{{{ replace 'os\\/(.*?)$' '$1' packageFileDir}}}-dind-image", - matchPackagePatterns: [ - 'alpine', - 'alpine.*?/docker', - 'docker/docker', - ], matchManagers: [ 'custom.regex', ], @@ -105,46 +94,55 @@ matchFileNames: [ 'os/**/Earthfile', ], + matchPackageNames: [ + '/alpine/', + '/alpine.*?/docker/', + '/docker/docker/', + ], }, { - // let all package updates auto merge - matchPackagePatterns: [ '*' ], automerge: true, + matchPackageNames: [ + '*', + ], }, { - // rule to update earthbuild/dind:alpine-* images groupName: 'docs-dind-images', - matchPackageNames: ['earthbuild/dind'], - matchCurrentVersion: "/^alpine-.*/", - allowedVersions: "/^alpine-.*/", - versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-r(?\\d+)$", + matchPackageNames: [ + 'earthbuild/dind', + ], + matchCurrentVersion: '/^alpine-.*/', + allowedVersions: '/^alpine-.*/', + versioning: 'regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-r(?\\d+)$', }, { - // rule to update earthbuild/dind:ubuntu:20.04-* images groupName: 'docs-dind-images', - matchPackageNames: ['earthbuild/dind'], - matchCurrentVersion: "/^ubuntu-20\\.04-.*/", - allowedVersions: "/^ubuntu-20\\.04-.*/", - versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$", + matchPackageNames: [ + 'earthbuild/dind', + ], + matchCurrentVersion: '/^ubuntu-20\\.04-.*/', + allowedVersions: '/^ubuntu-20\\.04-.*/', + versioning: 'regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$', }, { - // rule to update earthbuild/dind:ubuntu:23.04-* images groupName: 'docs-dind-images', - matchPackageNames: ['earthbuild/dind'], - matchCurrentVersion: "/^ubuntu-23\\.04-.*/", - allowedVersions: "/^ubuntu-23\\.04-.*/", - versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$", + matchPackageNames: [ + 'earthbuild/dind', + ], + matchCurrentVersion: '/^ubuntu-23\\.04-.*/', + allowedVersions: '/^ubuntu-23\\.04-.*/', + versioning: 'regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$', }, { - // rule to update earthbuild/dind:ubuntu:24.04-* images groupName: 'docs-dind-images', - matchPackageNames: ['earthbuild/dind'], - matchCurrentVersion: "/^ubuntu-24\\.04-.*/", - allowedVersions: "/^ubuntu-24\\.04-.*/", - versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$", + matchPackageNames: [ + 'earthbuild/dind', + ], + matchCurrentVersion: '/^ubuntu-24\\.04-.*/', + allowedVersions: '/^ubuntu-24\\.04-.*/', + versioning: 'regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$', }, { - // create PRs for multiple docker versions in case we're more than one major version behind matchPackageNames: [ 'docker/docker', ], From 8c671002a264ba73ff5e8fb84afc9ba8dbba71be Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 22:23:08 +0000 Subject: [PATCH 07/45] chore(deps): update peter-evans/dockerhub-description action to v4.0.2 (#8) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/update_readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 7e9cd15..47e8989 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -17,7 +17,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - name: Update DockerHub description for earthly/dind - uses: peter-evans/dockerhub-description@v4.0.0 + uses: peter-evans/dockerhub-description@v4.0.2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} From db8ef7e079402486f4106e6ee152565b8bc740ec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 00:08:43 +0100 Subject: [PATCH 08/45] chore(deps): update alpine docker tag to v3.22 (#9) * chore(deps): update alpine docker tag to v3.22 * chore: bump docker to 28.3.0 in alpine --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Janis Horsts --- os/alpine/Earthfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os/alpine/Earthfile b/os/alpine/Earthfile index 4e28a73..4a9e0ee 100644 --- a/os/alpine/Earthfile +++ b/os/alpine/Earthfile @@ -9,9 +9,9 @@ IMPORT ../../common AS common ARG --global OS_IMAGE=alpine # renovate: datasource=docker depName=alpine -ARG --global OS_VERSION=3.20 -# renovate: datasource=repology depName=alpine_3_20/docker versioning=loose -ARG --global DOCKER_VERSION=26.1.5-r0 +ARG --global OS_VERSION=3.22 +# renovate: datasource=repology depName=alpine_3_22/docker versioning=loose +ARG --global DOCKER_VERSION=28.3.0-r0 # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in ARG --global DIR_PATH=$OS_IMAGE From 5a214b1c4cedbcf86c4f885aef76c58b82b3d155 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 02:49:16 +0000 Subject: [PATCH 09/45] chore(deps): update dependency docker/docker to v27.5.1 (#10) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/ubuntu-20.04/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/ubuntu-20.04/Earthfile b/os/ubuntu-20.04/Earthfile index a6ec062..e0d7d6c 100644 --- a/os/ubuntu-20.04/Earthfile +++ b/os/ubuntu-20.04/Earthfile @@ -10,7 +10,7 @@ ARG --global OS_IMAGE=ubuntu ARG --global OS_VERSION=20.04 # renovate: datasource=github-releases depName=docker/docker -LET docker_package_version=27.2.1 +LET docker_package_version=27.5.1 ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~focal # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in From 27a58f1a20a3aaa846acff4219435da151a6b475 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 06:18:22 +0000 Subject: [PATCH 10/45] chore(deps): update dependency docker/docker to v27.5.1 (#11) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/ubuntu-24.04/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/ubuntu-24.04/Earthfile b/os/ubuntu-24.04/Earthfile index fcfbcb0..14f484a 100644 --- a/os/ubuntu-24.04/Earthfile +++ b/os/ubuntu-24.04/Earthfile @@ -10,7 +10,7 @@ ARG --global OS_IMAGE=ubuntu ARG --global OS_VERSION=24.04 # renovate: datasource=github-releases depName=docker/docker -LET docker_package_version=27.3.1 +LET docker_package_version=27.5.1 ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~noble # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in From c19250eb74beba10463a96cae4e82b29a8e6b19d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 06:51:56 +0000 Subject: [PATCH 11/45] chore(deps): update docs-dind-images (#12) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docs/dockerhub.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dockerhub.md b/docs/dockerhub.md index 3532d0c..72956b8 100644 --- a/docs/dockerhub.md +++ b/docs/dockerhub.md @@ -11,8 +11,8 @@ This image supports 3 Linux distributions: * ubuntu:24.04 For which the current latest tags (respectively) are: -* `alpine-3.20-docker-26.1.5-r0` -* `ubuntu-20.04-docker-27.2.1-1` +* `alpine-3.22-docker-28.3.0-r0` +* `ubuntu-20.04-docker-27.5.1-1` * `ubuntu-23.04-docker-25.0.2-1` * `ubuntu-24.04-docker-27.3.1-1` From 7d8f530ec7bdac7ac3a64c12f9f0d0d4f73a38e3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 16:47:47 +0000 Subject: [PATCH 12/45] chore(deps): update earthbuild/dind docker tag to ubuntu-24.04-docker-27.5.1-1 (#14) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docs/dockerhub.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dockerhub.md b/docs/dockerhub.md index 72956b8..70680e9 100644 --- a/docs/dockerhub.md +++ b/docs/dockerhub.md @@ -14,7 +14,7 @@ For which the current latest tags (respectively) are: * `alpine-3.22-docker-28.3.0-r0` * `ubuntu-20.04-docker-27.5.1-1` * `ubuntu-23.04-docker-25.0.2-1` -* `ubuntu-24.04-docker-27.3.1-1` +* `ubuntu-24.04-docker-27.5.1-1` For other available tags, please check out https://hub.docker.com/r/earthly/dind/tags From 75595ace4eb3f68dd71c4fdc2cf1dbc422fc9fcf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 03:32:23 +0000 Subject: [PATCH 13/45] chore(deps): update dependency docker/docker to v28 (#19) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/ubuntu-24.04/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/ubuntu-24.04/Earthfile b/os/ubuntu-24.04/Earthfile index 14f484a..7677534 100644 --- a/os/ubuntu-24.04/Earthfile +++ b/os/ubuntu-24.04/Earthfile @@ -10,7 +10,7 @@ ARG --global OS_IMAGE=ubuntu ARG --global OS_VERSION=24.04 # renovate: datasource=github-releases depName=docker/docker -LET docker_package_version=27.5.1 +LET docker_package_version=28.3.2 ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~noble # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in From 9bc34ea8935d9b6b9b4a9f160b300de8dc741a17 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:05:40 +0000 Subject: [PATCH 14/45] chore(deps): update earthbuild/dind docker tag to ubuntu-24.04-docker-28.3.2-1 (#20) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docs/dockerhub.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dockerhub.md b/docs/dockerhub.md index 70680e9..66094e0 100644 --- a/docs/dockerhub.md +++ b/docs/dockerhub.md @@ -14,7 +14,7 @@ For which the current latest tags (respectively) are: * `alpine-3.22-docker-28.3.0-r0` * `ubuntu-20.04-docker-27.5.1-1` * `ubuntu-23.04-docker-25.0.2-1` -* `ubuntu-24.04-docker-27.5.1-1` +* `ubuntu-24.04-docker-28.3.2-1` For other available tags, please check out https://hub.docker.com/r/earthly/dind/tags From 1c56b1891245ca2bc5d32b0bc8244e1eb1015d68 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Sat, 12 Jul 2025 13:59:23 +0100 Subject: [PATCH 15/45] chore: lock docker to v25.0.2 for ubuntu 23.04 (#18) --- .github/renovate.json5 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index f1a8411..61a6c78 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -100,6 +100,16 @@ '/docker/docker/', ], }, + { + // Lock docker to v25.0.2 for Ubuntu 23.04. + matchFileNames: [ + 'os/ubuntu-23.04/Earthfile', + ], + matchPackageNames: [ + 'docker/docker', + ], + allowedVersions: '25.0.2', + }, { automerge: true, matchPackageNames: [ From b99720874be55218ec609a683f9651c5b6092919 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Mon, 14 Jul 2025 17:52:01 +0100 Subject: [PATCH 16/45] chore(renovate): lock docker to 28.1.1 for Ubuntu 20.04 (#21) --- .github/renovate.json5 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 61a6c78..7930d30 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -100,6 +100,16 @@ '/docker/docker/', ], }, + { + // Lock docker to v28.1.1 for Ubuntu 20.04. + matchFileNames: [ + 'os/ubuntu-20.04/Earthfile', + ], + matchPackageNames: [ + 'docker/docker', + ], + allowedVersions: '28.1.1', + }, { // Lock docker to v25.0.2 for Ubuntu 23.04. matchFileNames: [ From 38c587682d9e6e536bbb0631970bdccb6180ca8d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 21:40:58 +0000 Subject: [PATCH 17/45] chore(deps): update dependency docker/docker to v28 (#16) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/ubuntu-20.04/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/ubuntu-20.04/Earthfile b/os/ubuntu-20.04/Earthfile index e0d7d6c..3978dad 100644 --- a/os/ubuntu-20.04/Earthfile +++ b/os/ubuntu-20.04/Earthfile @@ -10,7 +10,7 @@ ARG --global OS_IMAGE=ubuntu ARG --global OS_VERSION=20.04 # renovate: datasource=github-releases depName=docker/docker -LET docker_package_version=27.5.1 +LET docker_package_version=28.1.1 ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~focal # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in From a2158d5b3d618de5575a6df158c104b2f3a31e46 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 04:36:58 +0000 Subject: [PATCH 18/45] chore(deps): update earthbuild/dind docker tag to ubuntu-20.04-docker-28.1.1-1 (#23) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docs/dockerhub.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dockerhub.md b/docs/dockerhub.md index 66094e0..e8c63ae 100644 --- a/docs/dockerhub.md +++ b/docs/dockerhub.md @@ -12,7 +12,7 @@ This image supports 3 Linux distributions: For which the current latest tags (respectively) are: * `alpine-3.22-docker-28.3.0-r0` -* `ubuntu-20.04-docker-27.5.1-1` +* `ubuntu-20.04-docker-28.1.1-1` * `ubuntu-23.04-docker-25.0.2-1` * `ubuntu-24.04-docker-28.3.2-1` From da36ef61b384759ffdd88b26b99284a74926ade8 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Wed, 16 Jul 2025 22:01:16 +0100 Subject: [PATCH 19/45] ci: speed up test build (#22) --- .github/workflows/ci.yml | 5 ++++- Earthfile | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0be996c..446b6a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,9 @@ concurrency: jobs: test: name: test + strategy: + matrix: + os: [alpine, ubuntu-20.04, ubuntu-23.04, ubuntu-24.04] runs-on: ubuntu-latest permissions: contents: read @@ -47,4 +50,4 @@ jobs: run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin if: github.event.pull_request.head.repo.full_name == github.repository - name: Run tests - run: earthly --ci -P --push +test + run: earthly --ci -P --push +test --OS=${{ matrix.os }} diff --git a/Earthfile b/Earthfile index 4f9bc27..ba76935 100644 --- a/Earthfile +++ b/Earthfile @@ -2,9 +2,10 @@ VERSION --wildcard-builds 0.8 PROJECT earthly-technologies/core -# test runs tests for all defined dind images in this repo +# test runs tests for for the given OS image (os/*/Earthfile) in this repo test: - BUILD --pass-args ./os/*+test-build + ARG --required OS + BUILD --pass-args ./os/$OS+test-build # release expects to get a renovate branch in the form of renovate/-dind-image, extracts the os and then kicks off its +release target # this is meant to be run by a github workflow From f94ac88a450d000703abb10908377d1c0c6e6a0e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:01:12 +0100 Subject: [PATCH 20/45] chore(deps): update earthbuild/earthbuild digest to 0bf3cda (#25) * chore(deps): update earthbuild/earthbuild digest to 0bf3cda --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Janis Horsts --- .arg | 2 +- .github/workflows/ci.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.arg b/.arg index 355e4e9..2b1f523 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=c10f2cffa9a7020bc6f3c9fbb88fb89c66adf8bd +EARTHLY_REPO_VERSION=0bf3cdad507afcf5f4cebd38d4765b543e2ebac3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 446b6a7..af5af97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,9 @@ concurrency: jobs: test: - name: test + name: test (${{ matrix.os }}) strategy: + matrix: os: [alpine, ubuntu-20.04, ubuntu-23.04, ubuntu-24.04] runs-on: ubuntu-latest @@ -51,3 +52,4 @@ jobs: if: github.event.pull_request.head.repo.full_name == github.repository - name: Run tests run: earthly --ci -P --push +test --OS=${{ matrix.os }} + From 6493c0c4a9583fea4f2f1d0102a0a2cc9c45464c Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Tue, 22 Jul 2025 13:13:36 +0100 Subject: [PATCH 21/45] chore: fix update docker hub readme flow (#28) --- .github/renovate.json5 | 2 +- .github/workflows/dockerhub-description.yml | 21 +++++ .github/workflows/update_readme.yml | 26 ------ CONTRIBUTING.md | 66 +++++++++++++-- README.md | 90 ++++----------------- docs/dockerhub.md | 54 ------------- 6 files changed, 98 insertions(+), 161 deletions(-) create mode 100644 .github/workflows/dockerhub-description.yml delete mode 100644 .github/workflows/update_readme.yml delete mode 100644 docs/dockerhub.md diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 7930d30..a9218d7 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -68,7 +68,7 @@ { customType: 'regex', managerFilePatterns: [ - '/docs/dockerhub.md$/', + 'README.md$/', ], matchStrings: [ '\\*\\s+\\`(?.+?)\\`\\n', diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/dockerhub-description.yml new file mode 100644 index 0000000..a3d447e --- /dev/null +++ b/.github/workflows/dockerhub-description.yml @@ -0,0 +1,21 @@ +name: Update Docker Hub description + +on: + push: + # branches: [ main ] + # paths: [ README.md ] + +jobs: + update: + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Update DockerHub description + uses: peter-evans/dockerhub-description@v4.0.2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: earthbuild/dind + short-description: The `dind` image is designed for EarthBuild targets \ No newline at end of file diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml deleted file mode 100644 index 47e8989..0000000 --- a/.github/workflows/update_readme.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Update Docker Hub README - -on: - push: - branches: [ main ] - paths: [ docs/dockerhub.md ] - -jobs: - update-docker-hub-readmes: - name: update dockerhub readmes - runs-on: ubuntu-latest - env: - # Used in our github action as the token - TODO: look to change it into an input - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Update DockerHub description for earthly/dind - uses: peter-evans/dockerhub-description@v4.0.2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: earthly/dind - readme-filepath: ./docs/dockerhub.md - short-description: Earthly dind (Docker In Docker) Images diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a83ba7d..0db4c44 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,12 +4,68 @@ Please refer to the [CNCF Community Code of Conduct v1.0](https://github.com/cncf/foundation/blob/main/code-of-conduct.md) -## CLA +## How Images are Built -### Individual +In this repository, we maintain the OS & Docker versions that warrants releasing a new version of the image. +However, the installations of docker and other dependencies are done via an installation script that is currently maintained in [earthbuild/earthbuild](https://github.com/earthbuild/earthbuild). -All contributions must indicate agreement to the [Earthly Contributor License Agreement](https://gist.github.com/vladaionescu/ed990fa149a38a53ac74b64155bc6766) by logging into GitHub via the CLA assistant and signing the provided CLA. The CLA assistant will automatically notify the PRs that require CLA signing. +### Dependencies -### Entity +Dependencies are maintained by Renovate and will be merged automatically (provided required checks pass), primarily +dependencies that will trigger new versions of the dind images such as the docker or the os (alpine) versions. -If you are an entity, please use the [Earthly Contributor License Agreement form](https://earthly.dev/cla-form) in addition to requiring your individual contributors to sign all contributions. +## Repo structure + +```bash +. +├── Earthfile // Targets that apply to all images (e.g. +test) +├── common +│ └── Earthfile // A library of common helper targets +└── os // Each directory contains an Earthfile with targets to maintain the specific os (e.g. +test, +build) + ├── alpine + │ └── Earthfile + ├── ubuntu-20.04 + │ └── Earthfile + ├── ubuntu-23.04 + │ └── Earthfile + └── ubuntu-24.04 + └── Earthfile +``` + +## Testing + +Images are tested by running remote test targets that are maintained in [earthbuild/earthbuild](https://github.com/earthbuild/earthbuild/tree/main/tests/with-docker). This is because these tests also help test [WITH DOCKER](https://docs.earthly.dev/docs/earthfile#with-docker) command in earthly cli. + +Temporary images are built, pushed, and pulled as part of the test cycle. + +### How to run tests + +* Test a specific image os: + +```bash +earthly --push -P ./os/+test-build +``` + +* Test all images: +```bash +earthly --push -P +test +``` + +#### Community members + +Community members do not have permissions to push a built image and run the tests against it. However, they can easily set a different container registry repository by changing the `CR_HOST` (default: ghcr.io) and `CR_ORG` ARG values in [.arg](.arg) to a private container registry repository or by passing the args in the earthly command, e.g. `earthly --push -P +test --CR_HOST= --CR_ORG=`. + +## Deployment + +When the relevant dependencies are updated by Renovate, new images/tags will be pushed automatically to the container registries - [ghcr.io/earthbuild/dind](https://ghcr.io/earthbuild/dind) and [earthbuild/dind](https://hub.docker.com/r/earthbuild/dind). + +## Contributing + +* Please report bugs as [GitHub issues](https://github.com/earthbuild/dind/issues). +* Join us on [Slack](https://earthly.dev/slack)! +* Questions via GitHub issues are welcome! +* PRs welcome! But please give a heads-up in a GitHub issue before starting work. If there is no GitHub issue for what you want to do, please create one. + +## Licensing + +Earthly is licensed under the Mozilla Public License Version 2.0. See [LICENSE](./LICENSE). \ No newline at end of file diff --git a/README.md b/README.md index 8062eae..6a8cfb3 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,24 @@ -# EarthBuild dind (Docker In Docker) Images -[![Release](https://github.com/earthbuild/dind/actions/workflows/release.yml/badge.svg)](https://github.com/earthbuild/dind/actions/workflows/release.yml) -![Docker Pulls](https://img.shields.io/docker/pulls/earthbuild/dind) +[![Release](https://github.com/earthbuild/dind/actions/workflows/release.yml/badge.svg)](https://github.com/earthbuild/dind/actions/workflows/release.yml) ![Docker Pulls](https://img.shields.io/docker/pulls/earthbuild/dind) +# EarthBuild Docker In Docker (dind) Images + +The `dind` (docker-in-docker) image is designed for EarthBuild targets that use the `WITH DOCKER` command. -EarthBuilds's official [ghcr.io/earthbuild/dind](https://ghcr.io/earthbuild/dind) and [earthbuild/dind](https://hub.docker.com/r/earthlbuild/dind) container images. For information on how to use these images, please refer to [docker in EarthBuild](https://docs.earthly.dev/docs/guides/docker-in-earthly). ## Supported Distributions -There are currently 4 supported dind distributions available: -- `alpine` -- `ubuntu:20.04` -- `ubuntu:23.04` -- `ubuntu:24.04` - -Other distributions and/or base images can be used with our [dind+INSTALL](https://docs.earthly.dev/docs/guides/docker-in-earthly#performance) [FUNCTION](https://docs.earthly.dev/docs/guides/functions). - -## How Images are Built - -In this repository, we maintain the OS & Docker versions that warrants releasing a new version of the image. -However, the installations of docker and other dependencies are done via an installation script that is currently maintained in [earthbuild/earthbuild](https://github.com/earthbuild/earthbuild). - -### Dependencies - -Dependencies are maintained by Renovate and will be merged automatically (provided required checks pass), primarly -dependencies that will trigger new versions of the dind images such as the docker or the os (alpine) versions. - -## Repo structure - -```bash -. -├── Earthfile // Targets that apply to all images (e.g. +test) -├── common -│ └── Earthfile // A library of common helper targets -└── os // Each directory contains an Earthfile with targets to maintain the specific os (e.g. +test, +build) - ├── alpine - │ └── Earthfile - ├── ubuntu-20.04 - │ └── Earthfile - └── ubuntu-23.04 - └── Earthfile - └── ubuntu-24.04 - └── Earthfile -``` - -## Testing - -Images are tested by running remote test targets that are maintained in [earthbuild/earthbuild](https://github.com/earthbuild/earthbuild/tree/main/tests/with-docker). This is because these tests also help test [WITH DOCKER](https://docs.earthly.dev/docs/earthfile#with-docker) command in earthly cli. - -Temporary images are built, pushed, and pulled as part of the test cycle. - -### How to run tests - -* Test a specific image os: - -```bash -earthly --push -P ./os/+test-build -``` - -* Test all images: -```bash -earthly --push -P +test -``` - -#### Community members - -Community members do not have permissions to push a built image and run the tests against it. However, they can easily set a different container registry repository by changing the `CR_HOST` (default: ghcr.io) and `CR_ORG` ARG values in [.arg](.arg) to a private container registry repository or by passing the args in the earthly command, e.g. `earthly --push -P +test --CR_HOST= --CR_ORG=`. - -## Deployment - -When the relevant dependencies are updated by Renovate, new images/tags will be pushed automatically to the container registries - [ghcr.io/earthbuild/dind](https://ghcr.io/earthbuild/dind) and [earthbuild/dind](https://hub.docker.com/r/earthlbuild/dind). - -## Contributing +This image supports the following Linux distributions: +* alpine +* ubuntu:20.04 +* ubuntu:23.04 +* ubuntu:24.04 -* Please report bugs as [GitHub issues](https://github.com/earthbuild/dind/issues). -* Join us on [Slack](https://earthly.dev/slack)! -* Questions via GitHub issues are welcome! -* PRs welcome! But please give a heads-up in a GitHub issue before starting work. If there is no GitHub issue for what you want to do, please create one. -* Check the [contributing page](./CONTRIBUTING.md) for more details. +For which the current latest tags (respectively) are: +* `alpine-3.22-docker-28.3.0-r0` +* `ubuntu-20.04-docker-28.1.1-1` +* `ubuntu-23.04-docker-25.0.2-1` +* `ubuntu-24.04-docker-28.3.2-1` -## Licensing +For other available tags, please check out [ghcr.io/earthbuild/dind](https://github.com/earthbuild/dind/pkgs/container/dind/versions?filters%5Bversion_type%5D=tagged) or [earthbuild/dind](https://hub.docker.com/r/earthbuild/dind/tags). -Earthly is licensed under the Mozilla Public License Version 2.0. See [LICENSE](./LICENSE). diff --git a/docs/dockerhub.md b/docs/dockerhub.md deleted file mode 100644 index e8c63ae..0000000 --- a/docs/dockerhub.md +++ /dev/null @@ -1,54 +0,0 @@ -The `dind` (docker-in-docker) image is designed for Earthfile targets that use the `WITH DOCKER` command. - -See the ["use-earthly-dind" best-practice](https://docs.earthly.dev/best-practices#use-earthly-dind) for details. - -## Tags - -This image supports 3 Linux distributions: -* alpine -* ubuntu:20.04 -* ubuntu:23.04 -* ubuntu:24.04 - -For which the current latest tags (respectively) are: -* `alpine-3.22-docker-28.3.0-r0` -* `ubuntu-20.04-docker-28.1.1-1` -* `ubuntu-23.04-docker-25.0.2-1` -* `ubuntu-24.04-docker-28.3.2-1` - -For other available tags, please check out https://hub.docker.com/r/earthly/dind/tags - -## Outdated Tags - -* `alpine` -* `ubuntu` - -## Note - -The outdated `ubuntu` image is incompatible with the earthly v0.7.14 (and fixed in v0.7.15). -Correspondingly the `alpine` image at one point was also incompatible with v0.7.14, but was updated with -a backwards-compatable fix. - -Users, however, are encouraged to pin to specific version tags moving forward. The unversioned tags will be left as-is -to help backwards-breaking changes. - -To ease this transition, one can make use of an `IF` command that depends on the `EARTHLY_VERSION` builtin argument: - -``` -VERSION 0.8 - -dind: - FROM earthly/dind:alpine - ARG EARTHLY_VERSION - ARG SMALLEST_VERSION="$(echo -e "$EARTHLY_VERSION\nv0.7.14" | sort -V | head -n 1)" - IF [ "$SMALLEST_VERSION" = "v0.7.14" ] - # earthly is at v0.7.14 or newer, and must use the more recent dind:alpine-3.19-docker-25.0.2-r0 image - FROM earthly/dind:alpine-3.19-docker-25.0.2-r0 - END - -test: - FROM +dind - WITH DOCKER - RUN docker --version # old versions of earthly will get 20.10.14, and newer will get 23.0.6 - END -``` From d4619ea31cd9d6faf25e9b3a7fe340c0beecd7ef Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Tue, 22 Jul 2025 20:23:59 +0100 Subject: [PATCH 22/45] ci: release ubuntu 23.04 (#29) --- os/ubuntu-23.04/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/ubuntu-23.04/Earthfile b/os/ubuntu-23.04/Earthfile index 0909ce0..98f46b0 100644 --- a/os/ubuntu-23.04/Earthfile +++ b/os/ubuntu-23.04/Earthfile @@ -10,7 +10,7 @@ ARG --global OS_IMAGE=ubuntu ARG --global OS_VERSION=23.04 # renovate: datasource=github-releases depName=docker/docker -LET docker_package_version=25.0.2 +LET docker_package_version=25.0.1 ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~lunar # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in From 5d22823a83ee0cbcf5837cb97ddb5b582d924d72 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 23:23:17 +0000 Subject: [PATCH 23/45] chore(deps): update dependency docker/docker to v25.0.2 (#30) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/ubuntu-23.04/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/ubuntu-23.04/Earthfile b/os/ubuntu-23.04/Earthfile index 98f46b0..0909ce0 100644 --- a/os/ubuntu-23.04/Earthfile +++ b/os/ubuntu-23.04/Earthfile @@ -10,7 +10,7 @@ ARG --global OS_IMAGE=ubuntu ARG --global OS_VERSION=23.04 # renovate: datasource=github-releases depName=docker/docker -LET docker_package_version=25.0.1 +LET docker_package_version=25.0.2 ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~lunar # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in From 7032eacfdadcaf8d3ba909be99229bcf54cdc4c0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Jul 2025 13:14:02 +0000 Subject: [PATCH 24/45] chore(deps): update earthbuild/earthbuild digest to 1075d69 (#32) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index 2b1f523..9a097d2 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=0bf3cdad507afcf5f4cebd38d4765b543e2ebac3 +EARTHLY_REPO_VERSION=1075d6986f7310be20b3ceeb8bf08ea4e0095e3c From 582bd19582bcbaf8640811137450d1174aae87cb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 00:15:11 +0000 Subject: [PATCH 25/45] chore(deps): update dependency docker/docker to v28.3.3 (#33) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/ubuntu-24.04/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/ubuntu-24.04/Earthfile b/os/ubuntu-24.04/Earthfile index 7677534..6a0164d 100644 --- a/os/ubuntu-24.04/Earthfile +++ b/os/ubuntu-24.04/Earthfile @@ -10,7 +10,7 @@ ARG --global OS_IMAGE=ubuntu ARG --global OS_VERSION=24.04 # renovate: datasource=github-releases depName=docker/docker -LET docker_package_version=28.3.2 +LET docker_package_version=28.3.3 ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~noble # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in From f0390801e1bbe7c5dd5fd063934a50cdaf5e5751 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 02:11:55 +0000 Subject: [PATCH 26/45] chore(deps): update dependency alpine_3_22/docker to v28.3.3-r0 (#34) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/alpine/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/alpine/Earthfile b/os/alpine/Earthfile index 4a9e0ee..6cbc726 100644 --- a/os/alpine/Earthfile +++ b/os/alpine/Earthfile @@ -11,7 +11,7 @@ ARG --global OS_IMAGE=alpine # renovate: datasource=docker depName=alpine ARG --global OS_VERSION=3.22 # renovate: datasource=repology depName=alpine_3_22/docker versioning=loose -ARG --global DOCKER_VERSION=28.3.0-r0 +ARG --global DOCKER_VERSION=28.3.3-r0 # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in ARG --global DIR_PATH=$OS_IMAGE From e53d4ea3e53eb8802d1c82a9c9feebe45aad7c6c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:53:01 +0000 Subject: [PATCH 27/45] chore(deps): update earthbuild/earthbuild digest to b8d8b79 (#35) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index 9a097d2..a1885c2 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=1075d6986f7310be20b3ceeb8bf08ea4e0095e3c +EARTHLY_REPO_VERSION=b8d8b79c70aa19e8d9237ea7c0efa68826bb2a5e From 455fc58e970ea65caa09a31d13750a693d1c9bec Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Wed, 6 Aug 2025 09:34:34 +0100 Subject: [PATCH 28/45] chore(renovate): fix update README.md with latest dind versions (#36) * chore(renovate): fix update README.md with latest dind versions * update docker description on README.md changes in main --- .github/renovate.json5 | 2 +- .github/workflows/dockerhub-description.yml | 8 ++++---- .github/workflows/release.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index a9218d7..8f66f7d 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -68,7 +68,7 @@ { customType: 'regex', managerFilePatterns: [ - 'README.md$/', + '/^README.md$/', ], matchStrings: [ '\\*\\s+\\`(?.+?)\\`\\n', diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/dockerhub-description.yml index a3d447e..87b9d89 100644 --- a/.github/workflows/dockerhub-description.yml +++ b/.github/workflows/dockerhub-description.yml @@ -2,11 +2,11 @@ name: Update Docker Hub description on: push: - # branches: [ main ] - # paths: [ README.md ] + branches: [ main ] + paths: [ README.md ] jobs: - update: + docker-hub-description: runs-on: ubuntu-24.04-arm steps: - uses: actions/checkout@v4 @@ -15,7 +15,7 @@ jobs: - name: Update DockerHub description uses: peter-evans/dockerhub-description@v4.0.2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} + username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} repository: earthbuild/dind short-description: The `dind` image is designed for EarthBuild targets \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 736e4c6..a972f01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: version: v0.8.15 - name: Log in to container registries (non fork only) run: |- - docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}" + docker login --username "${{ vars.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}" docker login ghcr.io --username ${{ github.actor }} --password "${{ secrets.GITHUB_TOKEN }}" if: github.event.pull_request.head.repo.full_name == github.repository - name: Build & Push image From d53b337cc7a97927a727101d7b1642c4087fc605 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 12:35:53 +0000 Subject: [PATCH 29/45] chore(deps): update docs-dind-images (#37) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a8cfb3..5354b9e 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ This image supports the following Linux distributions: * ubuntu:24.04 For which the current latest tags (respectively) are: -* `alpine-3.22-docker-28.3.0-r0` +* `alpine-3.22-docker-28.3.3-r0` * `ubuntu-20.04-docker-28.1.1-1` * `ubuntu-23.04-docker-25.0.2-1` -* `ubuntu-24.04-docker-28.3.2-1` +* `ubuntu-24.04-docker-28.3.3-1` For other available tags, please check out [ghcr.io/earthbuild/dind](https://github.com/earthbuild/dind/pkgs/container/dind/versions?filters%5Bversion_type%5D=tagged) or [earthbuild/dind](https://hub.docker.com/r/earthbuild/dind/tags). From 82609ca5ae6a2943ef122dbb353e52fc9ff56775 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 19:20:37 +0100 Subject: [PATCH 30/45] chore(deps): update earthbuild/earthbuild digest to d70bd9a (#38) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index a1885c2..b5be663 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=b8d8b79c70aa19e8d9237ea7c0efa68826bb2a5e +EARTHLY_REPO_VERSION=d70bd9ab5ebf3eb29728deb1f8c46976c01f2757 From 3a866ff132ba1fdc5f3c0a2c60222fe569b8334b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 01:07:48 +0000 Subject: [PATCH 31/45] chore(deps): update dependency alpine_3_22/docker to v28.3.3-r1 (#39) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/alpine/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/alpine/Earthfile b/os/alpine/Earthfile index 6cbc726..c2c3b8b 100644 --- a/os/alpine/Earthfile +++ b/os/alpine/Earthfile @@ -11,7 +11,7 @@ ARG --global OS_IMAGE=alpine # renovate: datasource=docker depName=alpine ARG --global OS_VERSION=3.22 # renovate: datasource=repology depName=alpine_3_22/docker versioning=loose -ARG --global DOCKER_VERSION=28.3.3-r0 +ARG --global DOCKER_VERSION=28.3.3-r1 # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in ARG --global DIR_PATH=$OS_IMAGE From 1f0d2b4d37ff926bae3f5358cea0d9979774e479 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 09:31:32 +0000 Subject: [PATCH 32/45] chore(deps): update earthbuild/dind docker tag to alpine-3.22-docker-28.3.3-r1 (#40) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5354b9e..7319ec6 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This image supports the following Linux distributions: * ubuntu:24.04 For which the current latest tags (respectively) are: -* `alpine-3.22-docker-28.3.3-r0` +* `alpine-3.22-docker-28.3.3-r1` * `ubuntu-20.04-docker-28.1.1-1` * `ubuntu-23.04-docker-25.0.2-1` * `ubuntu-24.04-docker-28.3.3-1` From f8cf8c4428edf69d74d07702102ff60be919e04f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 16:57:55 +0000 Subject: [PATCH 33/45] chore(deps): update actions/checkout action to v5 (#41) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/dockerhub-description.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af5af97..b263a83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: EARTHLY_CONVERSION_PARALLELISM: "5" EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 # The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects # the host's IPv6 capability and then requires IPv6 NAT to create networks # for kind. So we load it here. diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/dockerhub-description.yml index 87b9d89..a122eaf 100644 --- a/.github/workflows/dockerhub-description.yml +++ b/.github/workflows/dockerhub-description.yml @@ -9,7 +9,7 @@ jobs: docker-hub-description: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Update DockerHub description diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a972f01..7690b4b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: EARTHLY_CONVERSION_PARALLELISM: "5" EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 # The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects # the host's IPv6 capability and then requires IPv6 NAT to create networks # for kind. So we load it here. From afe1ecfb59a098008869fcdde49112bed1491804 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 21:36:08 +0000 Subject: [PATCH 34/45] chore(deps): update earthbuild/earthbuild digest to cdead51 (#42) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index b5be663..5410a8b 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=d70bd9ab5ebf3eb29728deb1f8c46976c01f2757 +EARTHLY_REPO_VERSION=cdead518e32c8edd48452c824e5f118caa9eed9f From 74ad6daf3e67d29458a4f87349fa0148c306ca1d Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Fri, 22 Aug 2025 09:10:15 +0100 Subject: [PATCH 35/45] chore(renovate): extend security:openssf-scorecard (#43) Co-authored-by: Squirrel --- .github/renovate.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 8f66f7d..6b797af 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -2,6 +2,7 @@ $schema: 'https://docs.renovatebot.com/renovate-schema.json', extends: [ 'config:recommended', + 'security:openssf-scorecard' ], forkProcessing: 'enabled', configMigration: true, From eefeaa09a08466c43610927d4adb8e39b2e96af6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 24 Aug 2025 21:34:13 +0000 Subject: [PATCH 36/45] chore(deps): update earthbuild/earthbuild digest to 6670444 (#44) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index 5410a8b..1c56e9f 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=cdead518e32c8edd48452c824e5f118caa9eed9f +EARTHLY_REPO_VERSION=66704445a7577250ea48f93d20351bf8be27af29 From 452575f2f7b305e29c52213722173d5c0cd96fed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 04:49:19 +0000 Subject: [PATCH 37/45] chore(deps): update dependency docker/docker to v28.4.0 (#46) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/ubuntu-24.04/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/ubuntu-24.04/Earthfile b/os/ubuntu-24.04/Earthfile index 6a0164d..d0c0738 100644 --- a/os/ubuntu-24.04/Earthfile +++ b/os/ubuntu-24.04/Earthfile @@ -10,7 +10,7 @@ ARG --global OS_IMAGE=ubuntu ARG --global OS_VERSION=24.04 # renovate: datasource=github-releases depName=docker/docker -LET docker_package_version=28.3.3 +LET docker_package_version=28.4.0 ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~noble # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in From 8547145282ddba5d788b56b372890a4715512994 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 17:35:08 +0000 Subject: [PATCH 38/45] chore(deps): update earthbuild/earthbuild digest to 313d582 (#45) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index 1c56e9f..84857e8 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=66704445a7577250ea48f93d20351bf8be27af29 +EARTHLY_REPO_VERSION=313d582d39c00fd7cbf42ac752294c80cfb10aff From c3c079d07b2611bdca6d5fa65d08bd1a7eec1e41 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 09:13:45 +0100 Subject: [PATCH 39/45] chore(deps): update dependency alpine_3_22/docker to v28.3.3-r2 (#47) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- os/alpine/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/alpine/Earthfile b/os/alpine/Earthfile index c2c3b8b..5e21fc0 100644 --- a/os/alpine/Earthfile +++ b/os/alpine/Earthfile @@ -11,7 +11,7 @@ ARG --global OS_IMAGE=alpine # renovate: datasource=docker depName=alpine ARG --global OS_VERSION=3.22 # renovate: datasource=repology depName=alpine_3_22/docker versioning=loose -ARG --global DOCKER_VERSION=28.3.3-r1 +ARG --global DOCKER_VERSION=28.3.3-r2 # DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in ARG --global DIR_PATH=$OS_IMAGE From a852f2175f085a7aa40a3dad891fb73ac5b0ad7e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 09:01:13 +0000 Subject: [PATCH 40/45] chore(deps): update earthbuild/earthbuild digest to 799e007 (#48) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index 84857e8..0d8d59a 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=313d582d39c00fd7cbf42ac752294c80cfb10aff +EARTHLY_REPO_VERSION=799e007bbc8704ced7d662386440823d45a2d57d From b62c536bc3a60776fa81eff900cf697d9314501c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 14:44:42 +0000 Subject: [PATCH 41/45] chore(deps): update docs-dind-images (#49) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7319ec6..69086ac 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ This image supports the following Linux distributions: * ubuntu:24.04 For which the current latest tags (respectively) are: -* `alpine-3.22-docker-28.3.3-r1` +* `alpine-3.22-docker-28.3.3-r2` * `ubuntu-20.04-docker-28.1.1-1` * `ubuntu-23.04-docker-25.0.2-1` -* `ubuntu-24.04-docker-28.3.3-1` +* `ubuntu-24.04-docker-28.4.0-1` For other available tags, please check out [ghcr.io/earthbuild/dind](https://github.com/earthbuild/dind/pkgs/container/dind/versions?filters%5Bversion_type%5D=tagged) or [earthbuild/dind](https://hub.docker.com/r/earthbuild/dind/tags). From 9332555849b2f59ce109361e6291f5fe33573ec7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 21:53:22 +0000 Subject: [PATCH 42/45] chore(deps): update earthbuild/earthbuild digest to 6c448d5 (#50) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index 0d8d59a..0d548e9 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=799e007bbc8704ced7d662386440823d45a2d57d +EARTHLY_REPO_VERSION=6c448d51f2b2143df1d3cd342e70370c3ec29ecd From 23942d04d9559f6bf5055c21cd9cbef59ef32d37 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 21 Sep 2025 16:50:36 +0000 Subject: [PATCH 43/45] chore(deps): update earthbuild/earthbuild digest to 4e75ce1 (#51) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index 0d548e9..73c64cb 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=6c448d51f2b2143df1d3cd342e70370c3ec29ecd +EARTHLY_REPO_VERSION=4e75ce18022f67677913c9bf31ece0b8a375df62 From 5c288a6565e81986c246ee36ec9f3dfccbed0f53 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 14:48:11 +0000 Subject: [PATCH 44/45] chore(deps): update earthbuild/earthbuild digest to bc95557 (#52) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index 73c64cb..5a4fbd5 100644 --- a/.arg +++ b/.arg @@ -1,4 +1,4 @@ CR_HOST=ghcr.io CR_ORG=earthbuild IMAGE_NAME=dind -EARTHLY_REPO_VERSION=4e75ce18022f67677913c9bf31ece0b8a375df62 +EARTHLY_REPO_VERSION=bc955577ae9cb81dd5d54fd89f417e845e6da3e4 From e8c4f50926b509135ac421b0995438ae8f612125 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Tue, 23 Sep 2025 16:06:14 +0100 Subject: [PATCH 45/45] ci: add earthly count --- .github/workflows/earthly-count.yml | 185 ++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 .github/workflows/earthly-count.yml diff --git a/.github/workflows/earthly-count.yml b/.github/workflows/earthly-count.yml new file mode 100644 index 0000000..8107b0b --- /dev/null +++ b/.github/workflows/earthly-count.yml @@ -0,0 +1,185 @@ +name: Track Earthly to Earthbuild Progress + +on: + pull_request: + types: [opened, synchronize] + +jobs: + count-earthly: + runs-on: ubuntu-24.04-arm + permissions: + contents: read + pull-requests: write + + steps: + - name: Checkout PR branch + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 + with: + fetch-depth: 0 + + - name: Count occurrences in PR branch + id: count_pr + run: | + # Count total occurrences + total_count=$(git grep -i "earthly" 2>/dev/null | wc -l || echo "0") + echo "total_count=$total_count" >> $GITHUB_OUTPUT + + # Count by file type + go_count=$(git grep -i "earthly" -- "*.go" 2>/dev/null | wc -l || echo "0") + md_count=$(git grep -i "earthly" -- "*.md" 2>/dev/null | wc -l || echo "0") + earthfile_count=$(($(git grep -i "earthly" -- "Earthfile" 2>/dev/null | wc -l || echo "0") + $(git grep -i "earthly" -- "*.earth" 2>/dev/null | wc -l || echo "0"))) + + echo "go_count=$go_count" >> $GITHUB_OUTPUT + echo "md_count=$md_count" >> $GITHUB_OUTPUT + echo "earthfile_count=$earthfile_count" >> $GITHUB_OUTPUT + + echo "PR branch - Total: $total_count (Go: $go_count, MD: $md_count, Earthfiles: $earthfile_count)" + + - name: Checkout main branch + run: | + git checkout origin/main + + - name: Count occurrences in main branch + id: count_main + run: | + # Count total occurrences + total_count=$(git grep -i "earthly" 2>/dev/null | wc -l || echo "0") + echo "main_total_count=$total_count" >> $GITHUB_OUTPUT + + # Count by file type + go_count=$(git grep -i "earthly" -- "*.go" 2>/dev/null | wc -l || echo "0") + md_count=$(git grep -i "earthly" -- "*.md" 2>/dev/null | wc -l || echo "0") + earthfile_count=$(($(git grep -i "earthly" -- "Earthfile" 2>/dev/null | wc -l || echo "0") + $(git grep -i "earthly" -- "*.earth" 2>/dev/null | wc -l || echo "0"))) + + echo "main_go_count=$go_count" >> $GITHUB_OUTPUT + echo "main_md_count=$md_count" >> $GITHUB_OUTPUT + echo "main_earthfile_count=$earthfile_count" >> $GITHUB_OUTPUT + + echo "Main branch - Total: $total_count (Go: $go_count, MD: $md_count, Earthfiles: $earthfile_count)" + + - name: Calculate difference + id: calculate + run: | + pr_count=${{ steps.count_pr.outputs.total_count }} + main_count=${{ steps.count_main.outputs.main_total_count }} + difference=$((main_count - pr_count)) + + # Calculate percentage with proper formatting + if [ $main_count -gt 0 ]; then + # Use awk for better decimal handling + percentage=$(awk "BEGIN {printf \"%.2f\", $difference * 100 / $main_count}") + else + percentage="0.00" + fi + + echo "difference=$difference" >> $GITHUB_OUTPUT + echo "percentage=$percentage" >> $GITHUB_OUTPUT + echo "pr_count=$pr_count" >> $GITHUB_OUTPUT + echo "main_count=$main_count" >> $GITHUB_OUTPUT + + # Calculate differences by type + go_diff=$((${{ steps.count_main.outputs.main_go_count }} - ${{ steps.count_pr.outputs.go_count }})) + md_diff=$((${{ steps.count_main.outputs.main_md_count }} - ${{ steps.count_pr.outputs.md_count }})) + earthfile_diff=$((${{ steps.count_main.outputs.main_earthfile_count }} - ${{ steps.count_pr.outputs.earthfile_count }})) + + echo "go_diff=$go_diff" >> $GITHUB_OUTPUT + echo "md_diff=$md_diff" >> $GITHUB_OUTPUT + echo "earthfile_diff=$earthfile_diff" >> $GITHUB_OUTPUT + + - name: Comment on PR + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd #v8.0.0 + with: + script: | + const prCount = ${{ steps.calculate.outputs.pr_count }}; + const mainCount = ${{ steps.calculate.outputs.main_count }}; + const difference = ${{ steps.calculate.outputs.difference }}; + const percentage = '${{ steps.calculate.outputs.percentage }}'; + + // File type differences + const goDiff = ${{ steps.calculate.outputs.go_diff }}; + const mdDiff = ${{ steps.calculate.outputs.md_diff }}; + const earthfileDiff = ${{ steps.calculate.outputs.earthfile_diff }}; + + let emoji = '📊'; + let message = ''; + + if (difference > 0) { + emoji = '🎉'; + message = `Great progress! You've reduced "earthly" occurrences by **${difference}** (${percentage}%)`; + } else if (difference < 0) { + emoji = '⚠️'; + message = `Warning: "earthly" occurrences have increased by **${Math.abs(difference)}** (${Math.abs(parseFloat(percentage))}%)`; + } else { + emoji = '➖'; + message = 'No change in "earthly" occurrences'; + } + + // Build detailed breakdown + let breakdown = ''; + if (goDiff !== 0 || mdDiff !== 0 || earthfileDiff !== 0) { + breakdown = ` + + ### 📁 Changes by file type: + | File Type | Change | + |-----------|--------| + | Go files (.go) | ${goDiff > 0 ? '✅ -' + goDiff : goDiff < 0 ? '❌ +' + Math.abs(goDiff) : '➖ No change'} | + | Documentation (.md) | ${mdDiff > 0 ? '✅ -' + mdDiff : mdDiff < 0 ? '❌ +' + Math.abs(mdDiff) : '➖ No change'} | + | Earthfiles | ${earthfileDiff > 0 ? '✅ -' + earthfileDiff : earthfileDiff < 0 ? '❌ +' + Math.abs(earthfileDiff) : '➖ No change'} |`; + } + + const body = `## ${emoji} Are we earthbuild yet? + + ${message} + + ### 📈 Overall Progress + | Branch | Total Count | + |--------|-------------| + | main | ${mainCount} | + | This PR | ${prCount} | + | **Difference** | **${difference > 0 ? '-' : '+'}${Math.abs(difference)}** ${difference !== 0 ? `(${Math.abs(parseFloat(percentage))}%)` : ''} | + ${breakdown} + + --- + *Keep up the great work migrating from Earthly to Earthbuild!* 🚀 + +
+ 💡 Tips for finding more occurrences + + Run locally to see detailed breakdown: + \`\`\`bash + ./.github/scripts/count-earthly.sh + \`\`\` + + **Note that the goal is not to reach 0.** + There is anticipated to be at least _some_ occurences of \`earthly\` in the source code due to backwards compatibility with config files and language constructs. +
`; + + // Find existing comment + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + + const botComment = comments.find(comment => + comment.user.type === 'Bot' && + comment.body.includes('Are we earthbuild yet?') + ); + + if (botComment) { + // Update existing comment + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: botComment.id, + body: body + }); + } else { + // Create new comment + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: body + }); + }