{"id":35142446,"url":"https://github.com/teneplaysofficial/docker-publish","last_synced_at":"2026-01-13T22:54:15.510Z","repository":{"id":329965213,"uuid":"1121150834","full_name":"teneplaysofficial/docker-publish","owner":"teneplaysofficial","description":"🐳 Build and push Docker images with multi-platform and multi-tag support","archived":false,"fork":false,"pushed_at":"2025-12-29T04:49:03.000Z","size":13,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T22:54:06.237Z","etag":null,"topics":["build","deploy","devops","docker","docker-hub","github-actions","publish","push","tags","tool"],"latest_commit_sha":null,"homepage":"https://teneplaysofficial.github.io/docker-publish","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teneplaysofficial.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}},"created_at":"2025-12-22T14:16:09.000Z","updated_at":"2026-01-11T21:43:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/teneplaysofficial/docker-publish","commit_stats":null,"previous_names":["teneplaysofficial/docker-publish"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/teneplaysofficial/docker-publish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teneplaysofficial%2Fdocker-publish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teneplaysofficial%2Fdocker-publish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teneplaysofficial%2Fdocker-publish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teneplaysofficial%2Fdocker-publish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teneplaysofficial","download_url":"https://codeload.github.com/teneplaysofficial/docker-publish/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teneplaysofficial%2Fdocker-publish/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["build","deploy","devops","docker","docker-hub","github-actions","publish","push","tags","tool"],"created_at":"2025-12-28T12:06:46.906Z","updated_at":"2026-01-13T22:54:15.503Z","avatar_url":"https://github.com/teneplaysofficial.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Publish Action\n\nBuild and publish Docker images to **Docker Hub** with a **safe, opinionated tagging strategy**, **multi-platform support**, and **zero boilerplate**.\n\n\u003e This action is designed to prevent common release mistakes such as accidentally pushing `latest` for prereleases.\n\n## ✨ Features\n\n- 🧱 **Build once, push multiple tags**\n- 🏷 **Smart SemVer-based tagging**\n- 🧬 **Multi-platform images**\n\n  - `linux/amd64`\n  - `linux/arm64`\n\n- 🔄 Supports versions without `v` prefix (`v1.2.3` → `1.2.3`)\n- ⚡ Uses Docker **Buildx + QEMU**\n- 🧩 Composite action (transparent \u0026 easy to audit)\n- 📦 Docker Hub compatible\n- 🧠 Fail-fast safety checks\n- ⚡ GitHub Actions cache for Docker layers\n- 🧪 Dry-run support\n- 🧾 Automatic job summary\n- 🚫 Strict tag safety guarantees\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e ## CI/CD Runner Requirement\n\u003e\n\u003e Recommended Runner: `ubuntu-latest`\n\u003e\n\u003e This action must be executed on a Linux GitHub Actions runner.\n\u003e\n\u003e ```yaml\n\u003e runs-on: ubuntu-latest\n\u003e ```\n\u003e\n\u003e **Why Linux runners?**\n\u003e\n\u003e - Docker image builds require **Linux kernel features**.\n\u003e - GitHub-hosted **macOS** and **Windows runners do not provide Docker Desktop**.\n\u003e - Docker Desktop (used locally on macOS/Windows) cannot run inside CI runners.\n\u003e - Linux runners provide a **native Docker daemon** required by **Buildx**.\n\u003e\n\u003e **What this means**\n\u003e\n\u003e - Builds run on Linux CI runners.\n\u003e - Built images run on Linux, macOS, and Windows via Docker Desktop or WSL2.\n\u003e - macOS / Windows runners are not supported for building.\n\u003e\n\u003e This is the standard and recommended setup for Docker-based CI/CD workflows.\n\n## 🚀 Quick Start\n\n```yaml\n- uses: teneplaysofficial/docker-publish@v1\n  with:\n    image_repo: tenedev/release-hub\n    version: v1.2.4\n    docker_username: ${{ secrets.DOCKERHUB_USERNAME }}\n    docker_password: ${{ secrets.DOCKERHUB_TOKEN }}\n```\n\n## 🏷 Tagging Strategy (Important)\n\nThe action determines tags **only from the version string**. All tags are derived strictly and exclusively from the provided version. No tags are inferred from Git history, branches, or commit metadata.\n\n### 🟢 Stable Release (no `-`)\n\n**Example**\n\n```text\n1.2.3\nv1.2.4\n```\n\n**Tags pushed**\n\n```text\n:1.2.4\n:latest\n:1\n```\n\n### 🔴 Numeric Prerelease → `next`\n\n**Example**\n\n```text\n1.2.3-1\n1.2.3-34\n```\n\n**Tags pushed**\n\n```text\n:1.2.3-34\n:next\n```\n\n### 🟡 Labeled Prerelease → label tag\n\n**Example**\n\n```text\n1.2.3-beta.2\n1.2.3-alpha\n1.2.3-rc.1\n```\n\n**Tags pushed**\n\n```text\n:1.2.3-beta.2\n:beta\n```\n\n```text\n:1.2.3-alpha\n:alpha\n```\n\n```text\n:1.2.3-rc.1\n:rc\n```\n\n## 🔐 Tag Safety Rules\n\n- `latest` is pushed only for stable releases\n- Major tags (e.g. `:1`) are only for stable releases\n- Prereleases can never overwrite stable tags\n- Invalid tag strategies fail the workflow before push\n\n\u003e These rules are enforced automatically and cannot be disabled.\n\n## 🧬 Multi-Platform Support\n\nBy default, images are built for:\n\n```text\nlinux/amd64\nlinux/arm64\n```\n\n## Image runtime support\n\nThese images run on:\n\n- Linux servers (native)\n- macOS (Docker Desktop)\n- Windows (Docker Desktop / WSL2)\n\n## 🧪 Dry-Run Mode\n\nWhen `dry_run: true`:\n\n- Image is built.\n- Tags are generated and validated.\n- Multi-platform build runs.\n- Images are not pushed.\n- Registry state is untouched.\n\n\u003e Ideal for CI validation and release previews.\n\n## ⚡ Docker Layer Caching\n\nThis action uses GitHub Actions cache for Docker layers.\n\n**Benefits**\n\n- Faster rebuilds\n- No external cache registry\n- Works automatically across workflow runs\n\n\u003e No configuration required.\n\n## ⚙️ Inputs\n\n| Name              | Required | Default        | Description                            |\n| ----------------- | -------- | -------------- | -------------------------------------- |\n| `image_repo`      | ✅       | —              | Docker image repo (`username/repo`)    |\n| `version`         | ✅       | —              | App version (`1.2.3`, `v1.2.3-beta.2`) |\n| `docker_username` | ✅       | —              | Docker Hub username                    |\n| `docker_password` | ✅       | —              | Docker Hub token/password              |\n| `context_path`    | ❌       | `.`            | Docker build context                   |\n| `dockerfile_path` | ❌       | `./Dockerfile` | Path to Dockerfile                     |\n| `dry_run`         | ❌       | `false`        | Build only, do not push images         |\n| `summary`         | ❌       | `true`         | Generate job summary                   |\n\n## 🛑 Fail-Fast Behavior\n\nThe workflow intentionally fails if:\n\n- `image_repo` is not in `namespace/repo` format.\n- No Docker tags are generated.\n- A prerelease attempts to publish `latest`.\n- Tag generation results in an empty set.\n- Docker build fails for any platform.\n\n\u003e This prevents broken or unsafe releases.\n\n## 🧪 Full Example Workflow\n\n```yaml\nname: Docker Release\n\non:\n  push:\n    tags:\n      - \"v*\"\n\njobs:\n  docker:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: teneplaysofficial/docker-publish@v1\n        with:\n          image_repo: tenedev/release-hub\n          version: ${{ github.ref_name }}\n          docker_username: ${{ secrets.DOCKERHUB_USERNAME }}\n          docker_password: ${{ secrets.DOCKERHUB_TOKEN }}\n```\n\n\u003e The action automatically strips the leading `v` from Git tags.\n\n## 🧾 Job Summary Output\n\nWhen `summary: true`, the action publishes a job summary including:\n\n- Image name.\n- Normalized version.\n- Release type.\n- Published tags.\n- Target platforms.\n- Execution mode (publish / dry-run).\n\n\u003e This improves traceability and auditability.\n\n### Sample Job Summary\n\nBelow is an example of what appears in the GitHub Actions → Job Summary panel:\n\n```md\n## Docker Publish Summary\n\nImage: `tenedev/release-hub`  \nVersion: `1.2.4`  \nStrategy: `stable`  \nMode: publish\n\n### Tags\n\n- `tenedev/release-hub:1.2.4`\n- `tenedev/release-hub:latest`\n- `tenedev/release-hub:1`\n\n### Platforms\n\n- linux/amd64\n- linux/arm64\n```\n\n**Prerelease (Dry-Run) Example**\n\n```md\n## Docker Publish Summary\n\nImage: `tenedev/release-hub`  \nVersion: `1.3.0-rc.1`  \nStrategy: `labeled`  \nMode: dry-run\n\n### Tags\n\n- `tenedev/release-hub:1.3.0-rc.1`\n- `tenedev/release-hub:rc`\n\n### Platforms\n\n- linux/amd64\n- linux/arm64\n```\n\n## 🛡 Why This Action?\n\nMost Docker workflows:\n\n- Push `latest` accidentally.\n- Rebuild per tag.\n- Don’t support ARM.\n- Copy-paste huge YAML blocks.\n\nThis action:\n\n- Encodes **safe defaults**.\n- Keeps workflows **short**.\n- Follows **real SemVer rules**.\n- Scales cleanly across projects.\n\n## 🔍 Security \u0026 Transparency\n\n- Uses **official Docker GitHub Actions**.\n- Secrets used only for authentication.\n- No secrets exposed to build steps.\n- No bundled binaries.\n- No Node.js runtime.\n- No compiled artifacts.\n- Fully auditable YAML + Bash.\n\n## 🙌 Contributing\n\nIssues and PRs are welcome.\nThis action is intentionally **small, focused, and predictable**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteneplaysofficial%2Fdocker-publish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteneplaysofficial%2Fdocker-publish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteneplaysofficial%2Fdocker-publish/lists"}