2e9356cce44bd32065b0f8bd2d615277b39e2567
Bump docker/setup-buildx-action from 2.4.1 to 2.5.0
Docker Build and Push GitHub Actions Workflow
A Reusable Workflow of the Docker GitHub Actions steps. Enhanced with learnings from production use.
Reasons to use this workflow
- Easier to start with than hand-building all the Docker Actions into a single workflow.
- Provides inline docs based on real-world usage of this workflow.
- Gives you inputs so you can reuse this workflow across many repositories and only needing the full workflow stored in a central repository.
Steps to adopt this workflow
- Fork this repository and tweak the reusable workflow to your liking: .github/workflows/reusable-docker-build.yaml
- Copy my "calling" workflow
templates/call-docker-build.yamlto all the repos you want to build images in, and change it to point to the forked workflow above.
"But what does this workflow really do beyond just docker build?"
- Clone the repository
- Setup QEMU for multi-platform building (buildx) via docker/setup-qemu-action
- Setup buildx for awesome and fast building via docker/setup-buildx-action
- Log into Docker Hub and/or GHCR
- Add labels and tags via docker/metadata-action
- Build and push image via docker/build-push-action with GitHub-based layer caching
- Reports tags and labels in the PR comments
This repository is part of my example DevOps repos on GitHub Actions
- bretfisher/github-actions-templates - Main reusable templates repository
- bretfisher/super-linter-workflow - Reusable linter workflow
- (you are here) bretfisher/docker-build-workflow- Reusable docker build workflow
- bretfisher/docker-ci-automation - Step by step video and example of a Docker CI workflow
- My full list of container examples and tools
More reading
🎉🎉🎉 Join my container DevOps community 🎉🎉🎉
Languages
Dockerfile
100%