{"id":17062879,"url":"https://github.com/bretfisher/docker-build-workflow","last_synced_at":"2025-10-14T15:08:07.651Z","repository":{"id":39504066,"uuid":"465105844","full_name":"BretFisher/docker-build-workflow","owner":"BretFisher","description":"A Reusable Workflow of the Docker GitHub Actions","archived":false,"fork":false,"pushed_at":"2025-10-13T06:21:25.000Z","size":237,"stargazers_count":48,"open_issues_count":2,"forks_count":38,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T15:07:12.075Z","etag":null,"topics":["actions","containers","devops","docker","github-actions","workflow","workflow-reusable"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BretFisher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"patreon":"bretfisher"}},"created_at":"2022-03-02T00:48:19.000Z","updated_at":"2025-10-13T06:21:28.000Z","dependencies_parsed_at":"2023-12-12T01:28:39.919Z","dependency_job_id":"b1d15790-1c7b-4916-afe3-250790d1dba6","html_url":"https://github.com/BretFisher/docker-build-workflow","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/BretFisher/docker-build-workflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fdocker-build-workflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fdocker-build-workflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fdocker-build-workflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fdocker-build-workflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BretFisher","download_url":"https://codeload.github.com/BretFisher/docker-build-workflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fdocker-build-workflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019293,"owners_count":26086709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","containers","devops","docker","github-actions","workflow","workflow-reusable"],"created_at":"2024-10-14T10:50:58.560Z","updated_at":"2025-10-14T15:08:07.630Z","avatar_url":"https://github.com/BretFisher.png","language":"Dockerfile","readme":"# Template: Docker Build GitHub Actions Workflow\n\n[![Lint Code Base](https://github.com/BretFisher/docker-build-workflow/actions/workflows/call-super-linter.yaml/badge.svg)](https://github.com/BretFisher/docker-build-workflow/actions/workflows/call-super-linter.yaml)\n[![Docker Build](https://github.com/BretFisher/docker-build-workflow/actions/workflows/call-local-docker-build.yaml/badge.svg)](https://github.com/BretFisher/docker-build-workflow/actions/workflows/call-local-docker-build.yaml)\n\nA Reusable Workflow of the Docker GitHub Actions steps. Enhanced with learnings from production use.\n\n\u003e ⚠️ **DO NOT call this workflow directly**, rather, use it as a template repository and fork it for your own reusable workflow. I might change this workflow at anytime, based on new GHA features or learnings, and your calling workflow might break. ⚠️\n\n## Reasons to use this workflow\n\n1. Easier to start with than hand-building all the Docker Actions into a single workflow.\n2. Provides inline docs based on real-world usage of this workflow.\n3. Gives you inputs so you can reuse this workflow across many repositories and only needing the full workflow stored in a central repository.\n4. New in 2023: Adds [SBOM and Provenance](https://docs.docker.com/build/attestations/) metadata to your images.\n5. New in 2023: [Example template](./templates/call-docker-build-promote.yaml) to use the reusable workflow twice, in an \"image promotion\" style of dual registries (one for devs and PRs, one for production after PR merges)\n\n## Steps to adopt this workflow\n\n1. Fork this repository and tweak the reusable workflow to your liking: [.github/workflows/reusable-docker-build.yaml](.github/workflows/reusable-docker-build.yaml)\n2. Copy my \"calling\" workflow [`templates/call-docker-build.yaml`](templates/call-docker-build.yaml) to all the repositories you want to build images in and change it to point to the forked workflow above.\n\n## \"But what does this workflow really do beyond just `docker build`?\"\n\n1. Clone the repository\n2. Setup QEMU for multi-platform building (via buildx) via docker/setup-qemu-action\n3. Setup buildx for awesome and fast building via docker/setup-buildx-action\n4. Log into Docker Hub and/or GHCR\n5. Add labels and tags via docker/metadata-action\n6. Build and push image via docker/build-push-action with GitHub-based layer caching\n7. Reports tags and labels in the PR comments\n\n## What other ways can I use this workflow?\n\nI have a more advanced example of using this reusable workflow to do a \"promotion\" style workflow of:\n\n1. On PR creation, build and push to a \"dev\" registry (GHCR)\n2. On PR merge, build and push to a \"prod\" registry (Docker Hub)\n3. Create a GitOps YAML update PR to update image tags\n4. Notify of GitOps PR creation in Slack\n\nI've added that example to my [github-actions-templates](https://github.com/BretFisher/github-actions-templates) repository. It calls the reusable `reusable-docker-build.yaml` file in this repository.\n\n## This repository is part of my example DevOps repositories on GitHub Actions\n\n- [bretfisher/github-actions-templates](https://github.com/BretFisher/github-actions-templates) - Main reusable templates repository\n- [bretfisher/super-linter-workflow](https://github.com/BretFisher/super-linter-workflow) - Reusable linter workflow\n- (you are here) [bretfisher/docker-build-workflow](https://github.com/BretFisher/docker-build-workflow)- Reusable docker build workflow\n- [bretfisher/docker-ci-automation](https://github.com/BretFisher/docker-ci-automation) - Step-by-step video and example of a Docker CI workflow\n- [My full list of container examples and tools](https://github.com/bretfisher)\n\n## More reading\n\n- [Docker Build/Push Action docs and examples](https://docs.docker.com/build/ci/github-actions/)\n- [My full list of container examples and tools](https://github.com/bretfisher)\n\n## 🎉🎉🎉 Join my cloud native DevOps community 🎉🎉🎉\n\n- [My Cloud Native DevOps Discord server](https://devops.fan)\n- [My weekly YouTube Live show](https://www.youtube.com/@BretFisher)\n- [My weekly newsletter](https://www.bretfisher.com/newsletter)\n- [My courses and coupons](https://www.bretfisher.com/courses)\n","funding_links":["https://patreon.com/bretfisher"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbretfisher%2Fdocker-build-workflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbretfisher%2Fdocker-build-workflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbretfisher%2Fdocker-build-workflow/lists"}