docs/build/ci/github-actions/index.md

2.3 KiB

title description keywords redirect_from
Introduction to GitHub Actions Docker maintains a set of official GitHub Actions for building Docker images. github, actions, gha, ci, build, introduction, tutorial
/ci-cd/github-actions/

GitHub Actions is a popular CI/CD platform for automating your build, test, and deployment pipeline. Docker provides a set of official GitHub Actions for you to use in your workflows. These official actions are reusable, easy-to-use components for building, annotating, and pushing images.

The following GitHub Actions are available:

  • Build and push Docker images{: target="blank" rel="noopener" class="" }: build and push Docker images with BuildKit.
  • Docker Login{: target="blank" rel="noopener" class="" }: sign in to a Docker registry.
  • Docker Setup Buildx{: target="blank" rel="noopener" class="" }: initiates a BuildKit builder.
  • Docker Metadata action{: target="blank" rel="noopener" class="" }: extracts metadata from Git reference and GitHub events.
  • Docker Setup QEMU{: target="blank" rel="noopener" class="" }: installs QEMU static binaries for multi-arch builds.
  • Docker Buildx Bake{: target="blank" rel="noopener" class="" }: enables using high-level builds with Bake.

Using Docker's actions provides an easy-to-use interface, while still allowing flexibility for customizing build parameters.

Get started with GitHub Actions

{% include gha-tutorial.md %}

Next steps

This tutorial has shown you how to create a simple GitHub Actions workflow, using the official Docker actions, to build and push an image to Docker Hub.

There are many more things you can do to customize your workflow to better suit your needs. To learn more about some of the more advanced use cases, take a look at the advanced examples, such as building multi-platform images, or using cache storage backends.