2022-05-31 23:00:45 -04:00
2022-05-02 15:40:42 -04:00
2022-03-01 19:48:20 -05:00
2022-05-02 15:43:05 -04:00

Docker Build and Push GitHub Actions Workflow

Lint Code Base Docker Build

A Reusable Workflow of the Docker GitHub Actions steps. Enhanced with learnings from production use.

Reasons to use this workflow

  1. Easier to start with than hand-building all the Docker Actions into a single workflow.
  2. Provides inline docs based on real-world usage of this workflow.
  3. 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

  1. Fork this repository and tweak the reusable workflow to your liking: .github/workflows/reusable-docker-build.yaml
  2. Copy my "calling" workflow templates/call-docker-build.yaml to 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?"

  1. Clone the repository
  2. Setup QEMU for multi-platform building (buildx) via docker/setup-qemu-action
  3. Setup buildx for awesome and fast building via docker/setup-buildx-action
  4. Log into Docker Hub and/or GHCR
  5. Add labels and tags via docker/metadata-action
  6. Build and push image via docker/build-push-action with layer caching
  7. Reports tags and labels in the PR comments

This repository is part of my example repos on GitHub Actions

More reading

🎉🎉🎉 Join my container DevOps community 🎉🎉🎉

Description
No description provided
Readme Unlicense 240 KiB
Languages
Dockerfile 100%