### Install Earthly binary for Docker-In-Docker setup Source: https://github.com/earthly/earthly/blob/main/docs/ci-integration/build-an-earthly-ci-image.md Download and install the Earthly binary in a Dockerfile, then run `earthly bootstrap`. Pin the version in the download URL to avoid future breakage. Assumes Docker is installed and available. ```docker RUN wget https://github.com/earthly/earthly/releases/download/v0.8.13/earthly-linux-amd64 -O /usr/local/bin/earthly && \ chmod +x /usr/local/bin/earthly && \ /usr/local/bin/earthly bootstrap ``` -------------------------------- ### earthly registry setup with username/password Source: https://github.com/earthly/earthly/blob/main/docs/earthly-command/earthly-command.md Example commands for username/password based registry setup with --cred-helper=none. The second command associates the credentials with a project using --org and --project flags. ```bash earthly [options] registry setup --username --password [] earthly [options] registry --org --project setup --username --password [] ``` -------------------------------- ### Simple Go example main.go Source: https://github.com/earthly/earthly/blob/main/README.md Go source file for the simple example. Prints 'hello world'. ```go // main.go package main import "fmt" func main() { fmt.Println("hello world") } ``` -------------------------------- ### Base Earthly Target: Set up base image and working directory Source: https://github.com/earthly/earthly/blob/main/docs/guides/integration.md Starts from a Docker image with Docker and Alpine, sets the working directory, and installs OpenJDK 11, bash, wget, and PostgreSQL client. This is the foundation for subsequent targets. ```Dockerfile VERSION 0.8 FROM earthly/dind:alpine-3.19-docker-25.0.5-r0 WORKDIR /scala-example RUN apk add openjdk11 bash wget postgresql-client ``` -------------------------------- ### Run the example with earthly +build Source: https://github.com/earthly/earthly/blob/main/examples/import/README.md Command to run the example Earthfile target. ```bash earthly +build ``` -------------------------------- ### Fetch Java tutorial part1 example Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-1-a-simple-earthfile.md Creates a tutorial directory, changes into it, and uses Earthly to fetch the part1 example from the GitHub repository. ```bash mkdir tutorial cd tutorial earthly --artifact github.com/earthly/earthly/examples/tutorial/java:main+part1/part1 ./part1 ``` -------------------------------- ### Install Docker with INSTALL_DIND UDC Source: https://github.com/earthly/earthly/blob/main/docs/guides/docker-in-earthly.md Shows how to use the `INSTALL_DIND` UDC to install Docker in the build environment at a controlled point, allowing better cache usage. The example places it before a `COPY` to cache the installation. ```Dockerfile FROM my-image:latest DO github.com/earthly/lib+INSTALL_DIND COPY ./docker-compose.yml ./ WITH DOCKER ... ... END ``` -------------------------------- ### earthly registry setup with gcloud Source: https://github.com/earthly/earthly/blob/main/docs/earthly-command/earthly-command.md Example commands for GCP artifact or container registry setup using --cred-helper=gcloud. The second command associates the credentials with a project using --org and --project flags. ```bash earthly registry setup --cred-helper gcloud --gcp-key earthly registry --org --project setup --cred-helper gcloud --gcp-service-account-key ``` -------------------------------- ### Copy Java example files Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-6-using-docker-with-earthly.md Commands to create a tutorial directory and copy the Part 6 Java example files. ```bash mkdir tutorial cd tutorial earthly --artifact github.com/earthly/earthly/examples/tutorial/java:main+part6/part6 ./part6 ``` -------------------------------- ### Run hello world with Podman Source: https://github.com/earthly/earthly/blob/main/docs/guides/podman.md Runs a basic hello world example to confirm Earthly uses the configured container frontend. The output shows the buildkit daemon starting as a podman container. If you see 'No frontend initialized' on Mac, your podman machine may not be running. ```bash > earthly github.com/earthly/hello-world:main+hello 1. Init 🚀 ———————————————————————————————————————————————————————————————————————————————— buildkitd | Starting buildkit daemon as a podman container (earthly-buildkitd)... buildkitd | ...Done ``` -------------------------------- ### Fetch Python tutorial part1 example Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-1-a-simple-earthfile.md Creates a tutorial directory, changes into it, and uses Earthly to fetch the part1 example from the GitHub repository. ```bash mkdir tutorial cd tutorial earthly --artifact github.com/earthly/earthly/examples/tutorial/python:main+part1/part1 ./part1 ``` -------------------------------- ### Dockerfile FROM AS example Source: https://github.com/earthly/earthly/blob/main/docs/earthfile/earthfile.md Example of a classical Dockerfile using FROM ... AS ... to define build stages. ```Dockerfile # Dockerfile FROM alpine:3.18 AS build # ... instructions for build FROM build as another # ... further instructions inheriting build FROM busybox as yet-another COPY --from=build ./a-file ./ ``` -------------------------------- ### Python example: copy files and build/docker targets Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-5-importing.md Complete example for the Python part 5 tutorial. The command copies the example files. The Earthfile defines a build target that copies source and saves it as an artifact, and a docker target that installs dependencies from a local wheelhouse and runs a Python script. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/python:main+part5/part5 ./part5 ``` ```Dockerfile VERSION 0.8 FROM python:3 WORKDIR /code build: FROM ./services/service-one+deps COPY src src SAVE ARTIFACT src /src docker: COPY +deps/wheels wheels COPY +build/src src COPY requirements.txt ./ ARG tag='latest' RUN pip install --no-index --find-links=wheels -r requirements.txt ENTRYPOINT ["python3", "./src/hello.py"] SAVE IMAGE python-example:$tag ``` -------------------------------- ### Fetch part3 example files (Java) Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-3-adding-dependencies-with-caching.md Command to copy the Java part3 example files using earthly --artifact. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/java:main+part3/part3 ./part3 ``` -------------------------------- ### Example output of Earthly build with default args Source: https://github.com/earthly/earthly/blob/main/docs/guides/build-args.md Example output from running the target with default args, showing the resolved time and name. ```text alpine:latest | --> Load metadata linux/arm64 +base | --> FROM alpine:latest +base | 100% resolve docker.io/library/alpine:latest@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300 +hello | --> ARG time = RUN $(date +%H:%M) +hello | --> RUN echo "hello $name, it is $time" +hello | hello John, it is 23:21 output | --> exporting outputs ``` -------------------------------- ### Copy Part 3 example files Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-3-adding-dependencies-with-caching.md Copies the files for the Part 3 example from the Earthly repository to the local ./part3 directory. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/go:main+part3/part3 ./part3 ``` -------------------------------- ### Fetch part3 example files (Python) Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-3-adding-dependencies-with-caching.md Command to copy the Python part3 example files using earthly --artifact. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/python:main+part3/part3 ./part3 ``` -------------------------------- ### Copy Part 4 example files Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-4-args.md Command to copy the example files for Part 4 of the tutorial from the Earthly repository. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/go:main+part4/part4 ./part4 ``` -------------------------------- ### Copy JavaScript example files Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-6-using-docker-with-earthly.md Command to copy the Part 6 JavaScript example files from the Earthly repository. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/js:main+part6/part6 ./part6 ``` -------------------------------- ### Java example: copy files and build/docker targets Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-5-importing.md Complete example for the Java part 5 tutorial. The command copies the example files. The Earthfile has a build target that compiles a Java application and saves the resulting binaries, and a docker target that packages them into a runnable image. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/java:main+part5/part5 ./part5 ``` ```Dockerfile VERSION 0.8 FROM openjdk:8-jdk-alpine RUN apk add --update --no-cache gradle WORKDIR /java-example build: FROM ./services/service-one+deps COPY src src RUN gradle build RUN gradle install SAVE ARTIFACT build/install/java-example/bin AS LOCAL build/bin SAVE ARTIFACT build/install/java-example/lib AS LOCAL build/lib docker: COPY +build/bin bin COPY +build/lib lib ARG tag='latest' ENTRYPOINT ["/java-example/bin/java-example"] SAVE IMAGE java-example:$tag ``` -------------------------------- ### Fetch part3 example files (JavaScript) Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-3-adding-dependencies-with-caching.md Command to copy the JavaScript part3 example files using earthly --artifact. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/js:main+part3/part3 ./part3 ``` -------------------------------- ### Run multi-platform build example with earthly Source: https://github.com/earthly/earthly/blob/main/docs/guides/multi-platform.md Command to run the multi-platform cross-compile example directly from GitHub without cloning the repository. ```bash earthly github.com/earthly/earthly/examples/multiplatform-cross-compile:main+build-all-platforms ``` -------------------------------- ### Copy example files with earthly --artifact Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-5-importing.md Command to copy the example files for Part 5 from the earthly repository. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/go:main+part5/part5 ./part5 ``` -------------------------------- ### Start Kubernetes example cluster Source: https://github.com/earthly/earthly/blob/main/docs/ci-integration/guides/kubernetes.md Command to run the Earthly target that creates a kind cluster named earthlydemo-aio and runs an Earthly build job. Requires kind and kubectl installed. ```go earthly ./kubernetes+start ``` -------------------------------- ### Copy tutorial files for Part 1 Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-1-a-simple-earthfile.md Commands to copy the tutorial files for Part 1 from the Earthly repository. Run these in a terminal to set up the example project. ```bash mkdir tutorial cd tutorial earthly --artifact github.com/earthly/earthly/examples/tutorial/go:main+part1/part1 ./part1 ``` -------------------------------- ### Fetch JavaScript tutorial part1 example Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-1-a-simple-earthfile.md Creates a tutorial directory, changes into it, and uses Earthly to fetch the part1 example from the GitHub repository. ```bash mkdir tutorial cd tutorial earthly --artifact github.com/earthly/earthly/examples/tutorial/js:main+part1/part1 ./part1 ``` -------------------------------- ### Earthfile: Base image with Pandoc installation Source: https://github.com/earthly/earthly/blob/main/docs/guides/best-practices.md This is the initial Earthfile snippet showing a base target that installs Pandoc. It is used as the starting point before adding the SAVE IMAGE command. ```Dockerfile base: FROM ruby:2.7 ARG TARGETARCH WORKDIR /site ... RUN apt-get install pandoc pandocfilters -y build: FROM +base # Build blog ``` -------------------------------- ### Clean up Jenkins demo environment Source: https://github.com/earthly/earthly/blob/main/docs/ci-integration/guides/jenkins.md Cleans up the example environment if it is broken, allowing a fresh start. ```go earthly ./jenkins+cleanup ``` -------------------------------- ### Java example: copy files and build Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-2-outputs.md Commands to copy the Java tutorial part 2 example, the Earthfile, and the application source code. ```bash mkdir tutorial cd tutorial earthly --artifact github.com/earthly/earthly/examples/tutorial/java:main+part2/part2 ./part2 ``` ```Dockerfile VERSION 0.8 FROM openjdk:8-jdk-alpine RUN apk add --update --no-cache gradle WORKDIR /java-example build: COPY build.gradle ./ COPY src src RUN gradle build RUN gradle install SAVE ARTIFACT build/install/java-example/bin /bin AS LOCAL build/bin SAVE ARTIFACT build/install/java-example/lib /lib AS LOCAL build/lib docker: COPY +build/bin bin COPY +build/lib lib ENTRYPOINT ["/java-example/bin/java-example"] SAVE IMAGE java-example:latest ``` ```java package hello; public class HelloWorld { public static void main(String[] args) { System.out.println("hello world"); } } ``` ```groovy apply plugin: 'java' apply plugin: 'application' mainClassName = 'hello.HelloWorld' jar { baseName = 'hello-world' version = '0.0.1' } sourceCompatibility = 1.8 targetCompatibility = 1.8 ``` -------------------------------- ### Copy tutorial example files Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-2-outputs.md Downloads the Part 2 example files from GitHub using the earthly artifact command, saving them to the local ./part2 directory. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/go:main+part2/part2 ./part2 ``` -------------------------------- ### earthly registry setup with ecr-login Source: https://github.com/earthly/earthly/blob/main/docs/earthly-command/earthly-command.md Example commands for AWS elastic container registry setup using --cred-helper=ecr-login. The second command associates the credentials with a project using --org and --project flags. ```bash earthly registry setup --cred-helper ecr-login --aws-access-key-id --aws-secret-access-key earthly registry --org --project setup --cred-helper ecr-login --aws-access-key-id --aws-secret-access-key ``` -------------------------------- ### JavaScript example: copy files and build Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-2-outputs.md Commands to copy the JavaScript tutorial part 2 example and the Earthfile for building and pushing a Docker image. ```bash mkdir tutorial cd tutorial earthly --artifact github.com/earthly/earthly/examples/tutorial/js:main+part2/part2 ./part2 ``` ```Dockerfile VERSION 0.8 FROM node:13.10.1-alpine3.11 WORKDIR /js-example build: # In JS, there's nothing to build in this simple form. # The source is also the artifact used in production. COPY src/index.js . SAVE ARTIFACT index.js /dist/index.js AS LOCAL ./dist/index.js docker: COPY +build/dist dist ENTRYPOINT ["node", "./dist/index.js"] SAVE IMAGE js-example:latest ``` ```js console.log("hello world"); ``` -------------------------------- ### Declare TARGETPLATFORM under LOCALLY Source: https://github.com/earthly/earthly/blob/main/docs/earthfile/builtin-args.md Under LOCALLY targets, declare TARGETPLATFORM after the LOCALLY command to get the appropriate user platform value. The example prints the target platform. ```Dockerfile my-target: LOCALLY ARG TARGETPLATFORM RUN echo "The target platform under LOCALLY is $TARGETPLATFORM" ``` -------------------------------- ### Run Built Binary Source: https://github.com/earthly/earthly/blob/main/examples/go/README.md Executing the built binary outputs "hello world". ```text ~/workspace/earthly/examples/go ❯ ./build/go-example hello world ``` -------------------------------- ### Set up custom git repository in earthly config Source: https://github.com/earthly/earthly/blob/main/docs/earthly-command/earthly-command.md Sets up a whole custom git repository for a server called example.com using a single-line YAML literal. The command yields the config file shown in the next snippet. ```bash config git "{example: {pattern: 'example.com/([^/]+)', substitute: 'ssh://git@example.com:2222/var/git/repos/\$1.git', auth: ssh, user: git}}" ``` -------------------------------- ### Clean up Kubernetes example cluster Source: https://github.com/earthly/earthly/blob/main/docs/ci-integration/guides/kubernetes.md Command to run the Earthly target that cleans up the kind cluster created by the start target. Run from the root of the ci-examples repository. ```go earthly ./kubernetes+clean ``` -------------------------------- ### earthly bootstrap command synopsis Source: https://github.com/earthly/earthly/blob/main/docs/earthly-command/earthly-command.md Initializes Earthly and can be re-run to fix broken setups. Recommended to run with sudo. Options include --no-buildkit to skip BuildKit setup, --with-autocomplete to install shell autocompletions (requires sudo), and --certs-hostname to specify a hostname for TLS key/certificate generation. ```shell earthly [options] bootstrap [--no-buildkit, --with-autocomplete, --certs-hostname] ``` -------------------------------- ### Debug Earthly binary with dlv exec Source: https://github.com/earthly/earthly/blob/main/CONTRIBUTING.md Starts Delve against the built Earthly binary, using -- to separate dlv args from earthly args. The example shows setting a breakpoint and continuing. ```text dlv exec ./build/own/earthly -- +base Type 'help' for list of commands. (dlv) break /earthly/earthfile2llb/interpreter.go:670 Breakpoint 1 set at 0x182866a for github.com/earthly/earthly/earthfile2llb.(*Interpreter).handleRun() /earthly/earthfile2llb/interpreter.go:670 (dlv) continue Init 🚀 ———————————————————————————————————————————————————————————————————————————————— buildkitd | Found buildkit daemon as podman container (earthly-dev-buildkitd) Build 🔧 ———————————————————————————————————————————————————————————————————————————————— golang:1.20-alpine3.17 | --> Load metadata golang:1.20-alpine3.17 linux/amd64 > github.com/earthly/earthly/earthfile2llb.(*Interpreter).handleRun() /earthly/earthfile2llb/interpreter.go:670 (hits goroutine(295):1 total:1) (PC: 0x182866a) (dlv) ``` -------------------------------- ### Good: Separate build and production images Source: https://github.com/earthly/earthly/blob/main/docs/guides/best-practices.md Multi-stage Earthly build: a build stage compiles the Go binary, and a separate production stage starts from a fresh base, installs only production dependencies, and copies the built artifact. This keeps the production image small. ```Dockerfile # Good FROM go:1.16 RUN apk add ... # development dependencies build: COPY ... RUN go mod download COPY ... RUN go build ... -o ./build/app SAVE ARTIFACT ./build/app image: FROM alpine:3.18 # start afresh RUN apk add ... # production dependencies only COPY +build/app /usr/bin/app ENTRYPOINT ["/usr/bin/app"] SAVE IMAGE my-production-image:latest ``` -------------------------------- ### Python Earthfile with Docker Compose Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-6-using-docker-with-earthly.md Earthfile for a Python application that installs dependencies, copies source, and runs integration tests against a PostgreSQL service using Docker Compose. The 'run-tests' target uses WITH DOCKER to start the compose services and run the test script. ```Dockerfile VERSION 0.8 FROM python:3 WORKDIR /code build: COPY ./requirements.txt . RUN pip install -r requirements.txt COPY . . run-tests: FROM earthly/dind:alpine-3.19-docker-25.0.5-r0 COPY ./docker-compose.yml . COPY ./tests ./tests RUN apk update RUN apk add postgresql-client WITH DOCKER --compose docker-compose.yml --load app:latest=+docker RUN while ! pg_isready --host=localhost --port=5432; do sleep 1; done ;\ docker run --network=default_python/part6_default app python3 ./tests/test_db_connection.py END ``` -------------------------------- ### Install QEMU on Ubuntu for multi-platform builds Source: https://github.com/earthly/earthly/blob/main/docs/guides/multi-platform.md Commands to install QEMU and binfmt support on Ubuntu, enabling execution of multi-architecture containers. The docker run command needs to be run once, and the docker stop command stops the Earthly buildkit daemon. ```bash sudo apt-get install qemu-system binfmt-support qemu-user-static docker run --rm --privileged multiarch/qemu-user-static --reset -p yes docker stop earthly-buildkitd || true ``` -------------------------------- ### Run multi-platform example from GitHub Source: https://github.com/earthly/earthly/blob/main/docs/guides/multi-platform.md Commands to run the multi-platform example from the Earthly GitHub repository without cloning, and to run the resulting Docker images. ```bash earthly github.com/earthly/earthly/examples/multiplatform:main+all docker run --rm earthly/examples:multiplatform docker run --rm earthly/examples:multiplatform_linux_amd64 docker run --rm earthly/examples:multiplatform_linux_arm_v7 ``` -------------------------------- ### .env file syntax and example Source: https://github.com/earthly/earthly/blob/main/docs/earthly-command/earthly-command.md Syntax for the .env file, which sets flag options as environment variables relative to the current working directory. Each variable must be on a separate line without surrounding quotes; lines starting with # are comments. The .env file is loaded from the directory where earthly is called. ```env = ... ``` ```env # Settings EARTHLY_ALLOW_PRIVILEGED=true EARTHLY_VERBOSE=true ``` -------------------------------- ### .arg file syntax and example Source: https://github.com/earthly/earthly/blob/main/docs/earthly-command/earthly-command.md Syntax for the .arg file, which stores build args relative to the current working directory. Each variable must be on a separate line without surrounding quotes; lines starting with # are comments. The .arg file is loaded from the directory where earthly is called, not necessarily the Earthfile directory. ```env = ... ``` ```env # an example build arg MY_SETTING=a setting which contains spaces ``` -------------------------------- ### Copy Java Part 4 example files Source: https://github.com/earthly/earthly/blob/main/docs/basics/part-4-args.md Command to copy the Java tutorial Part 4 example files into the current directory using earthly --artifact. ```bash earthly --artifact github.com/earthly/earthly/examples/tutorial/java:main+part4/part4 ./part4 ``` -------------------------------- ### Cloud-init script for AWS EC2 satellite deployment Source: https://github.com/earthly/earthly/blob/main/docs/cloud/satellites/self-hosted.md Use this cloud-init script when launching an EC2 instance to automatically start a self-hosted satellite on boot. It installs Docker, runs the satellite container with the necessary environment variables, and mounts a cache volume. The SATELLITE_HOST is auto-discovered from the instance's private DNS. ```yaml #cloud-config runcmd: - sudo dnf update - sudo dnf install -y docker - sudo systemctl start docker.service - sudo systemctl enable docker.service - |- sudo docker run -d --privileged \ --restart always \ --name satellite \ -p 8372:8372 \ -v /earthly-cache:/tmp/earthly:rw \ -e EARTHLY_TOKEN=GuFna*****nve7e \ -e EARTHLY_ORG=my-org \ -e SATELLITE_NAME=my-satellite \ earthly/satellite:v0.8.13 ``` -------------------------------- ### Bad: Copying file to LOCALLY target using SAVE ARTIFACT AS LOCAL Source: https://github.com/earthly/earthly/blob/main/docs/guides/best-practices.md This example shows a mistake where a non-LOCALLY target saves an artifact locally and a LOCALLY target tries to read it. Since outputs are written at the end of the build, the LOCALLY target may not have the file in time or may get a stale version. ```Dockerfile # Bad all: BUILD +dep BUILD +run-locally dep: FROM alpine:3.18 WORKDIR /work RUN echo "Hello World" > ./my-artifact.txt SAVE ARTIFACT ./my-artifact.txt AS LOCAL ./build/my-artifact.txt run-locally: LOCALLY RUN echo ./build/my-artifact.txt ``` -------------------------------- ### Run Docker Image Source: https://github.com/earthly/earthly/blob/main/examples/go/README.md Running the built Docker image outputs "hello world". ```text ~/workspace/earthly/examples/go ❯ docker run --rm go-example:latest hello world ``` -------------------------------- ### Install Earthly Source: https://github.com/earthly/earthly/blob/main/release/yum-repo/README.md Installs the Earthly package from the added repository. ```bash dnf -y install earthly ``` -------------------------------- ### Install Earthly BYOC via CloudFormation Source: https://github.com/earthly/earthly/blob/main/docs/cloud/satellites/byoc/aws/cloudformation.md Run this command after provisioning the BYOC stack via CloudFormation to install Earthly within the stack. Replace with the AWS stack name, which Earthly uses to reference the installation. A Green status indicates the installation is ready. ```shell earthly cloud install --via terraform --name ``` -------------------------------- ### Directory tree for COPY examples Source: https://github.com/earthly/earthly/blob/main/docs/earthfile/earthfile.md Shows the directory tree used in the following COPY examples. ```text test └── file ``` -------------------------------- ### Set up QEMU in GitHub Actions for multi-platform builds Source: https://github.com/earthly/earthly/blob/main/docs/guides/multi-platform.md GitHub Actions workflow step to enable QEMU emulation for multi-platform builds. Must be included in every job that performs a multi-platform build. ```yaml jobs: : steps: - name: Set up QEMU id: qemu uses: docker/setup-qemu-action@v1 with: image: tonistiigi/binfmt:latest platforms: all - uses: actions/checkout@v3 - ... ```