{
  "markdown": "# 🛠 Docker Actions\n\n> A set of composite GitHub Actions for authenticated Docker image builds, pulls, Helm chart publishing, and registry summary output using metadata artifacts.\n\n---\n\n## 📆 Actions\n\n### 🔨 `build`\n\n**Path:** `build/action.yml`\n\nBuild and push a Docker image using metadata from an `image.json` artifact.\n\n**Inputs:**\n\n| Name                | Description                                | Required | Default      |\n| ------------------- | ------------------------------------------ | -------- | ------------ |\n| `registry_user`     | Username for Docker registry auth          | ✅        | —            |\n| `registry_password` | Password/token for Docker registry         | ✅        | —            |\n| `artifact`          | Name of the image metadata artifact (JSON) | ✅        | `image.json` |\n| `GITHUB_TOKEN`      | GitHub token for `ghcr-docker-summary`     | ✅        | —            |\n| `extra_build_args`  | Additional Docker build-args (newline-separated `KEY=VALUE` pairs) | ❌ | `\"\"` |\n\n**Behavior:**\n\n- Downloads the `image.json` artifact and parses fields like `image`, `tag`, `url`, and `description`.\n- Logs in to the Docker registry using provided credentials.\n- Builds and pushes the Docker image using `docker/build-push-action` with:\n  - `cache-from` and `cache-to` using `image:buildcache`\n  - OCI labels for `version`, `description`, and `source`\n- Outputs a summary using `ghcr-docker-summary`.\n\n---\n\n### 📥 `pull`\n\n**Path:** `pull/action.yml`\n\nAuthenticate and pull a Docker image described in an `image.json` artifact.\n\n**Inputs:**\n\n| Name                | Description                                | Required | Default      |\n| ------------------- | ------------------------------------------ | -------- | ------------ |\n| `registry_user`     | Username for Docker registry auth          | ✅        | —            |\n| `registry_password` | Password/token for Docker registry         | ✅        | —            |\n| `artifact`          | Name of the image metadata artifact (JSON) | ❌        | `image.json` |\n\n**Outputs:**\n\n| Name  | Description                     |\n| ----- | ------------------------------- |\n| `url` | Fully-qualified image reference |\n\n**Behavior:**\n\n- Downloads the `image.json` artifact\n- Extracts the `registry` and `url` fields\n- Authenticates with the registry\n- Pulls the image using `docker pull`\n\n---\n\n### 📄 `ghcr-docker-summary`\n\n**Path:** `ghcr-docker-summary/action.yml`\n\nOutputs a summary of a GHCR-hosted image and resolves its internal image ID using the GitHub API.\n\n**Inputs:**\n\n| Name           | Description                              | Required |\n| -------------- | ---------------------------------------- | -------- |\n| `repository`   | Image name in the form `org/image`       | ✅        |\n| `tag`          | Tag to match in the registry             | ✅        |\n| `GITHUB_TOKEN` | GitHub token for resolving GHCR metadata | ✅        |\n\n**Outputs:**\n\n| Name       | Description            |\n| ---------- | ---------------------- |\n| `image_id` | Internal GHCR image ID |\n\n**Behavior:**\n\n- Calls GitHub API via `get_image_id.sh` to retrieve the image's internal ID\n- Writes a Markdown-formatted summary to `$GITHUB_STEP_SUMMARY`:\n  - Image tag with registry link\n  - Docker pull command in a code block\n\n---\n\n### 📦 `helm-publish`\n\n**Path:** `helm-publish/action.yml`\n\nPackage and push a Helm chart to an OCI-compatible registry (GHCR by default).\n\n**Inputs:**\n\n| Name                | Description                                          | Required | Default      |\n| ------------------- | ---------------------------------------------------- | -------- | ------------ |\n| `registry`          | OCI registry hostname                                | ❌        | `ghcr.io`    |\n| `registry_user`     | Registry username                                    | ✅        | —            |\n| `registry_password` | Registry password/token                              | ✅        | —            |\n| `chart_path`        | Path to chart directory (containing `Chart.yaml`)    | ❌        | `.`          |\n| `version`           | Version override (defaults to `Chart.yaml` version)  | ❌        | —            |\n| `repository`        | OCI repo namespace (e.g. `agent-ix`)                 | ❌        | repo owner   |\n| `artifact`          | Name of the output artifact                          | ❌        | `helm.json`  |\n\n**Outputs:**\n\n| Name         | Description                                    |\n| ------------ | ---------------------------------------------- |\n| `url`        | Full OCI URL of the pushed chart               |\n| `chart`      | Chart name (from `Chart.yaml`)                 |\n| `version`    | Chart version (input override or `Chart.yaml`) |\n| `repository` | OCI repository namespace used                  |\n\n**Behavior:**\n\n- Reads chart name/version from `Chart.yaml` (version input overrides)\n- Logs in to the OCI registry using `helm registry login`\n- Packages the chart with `helm package`\n- Pushes to `oci://<registry>/<repository>` with `helm push`\n- Writes a `helm.json` artifact with chart metadata\n- Outputs a summary with the chart URL and pull command\n\n---\n\n## 🧠 Caching Strategy\n\nThe `build` action enables build caching using:\n\n```\ncache-from: type=registry,ref=image:buildcache\ncache-to: type=registry,ref=image:buildcache,mode=max\n```\n\nThis leverages registry-based cache layers to accelerate rebuilds across CI runs.\n\n---\n\n## 🧰 Usage Pattern\n\nThese actions assume that your CI pipeline generates an `image.json` artifact before calling them. Example fields in `image.json`:\n\n```json\n{\n  \"registry\": \"ghcr.io\",\n  \"repository\": \"agent-ix/my-service\",\n  \"image\": \"ghcr.io/agent-ix/my-service\",\n  \"tag\": \"1.2.3\",\n  \"url\": \"ghcr.io/agent-ix/my-service:1.2.3\",\n  \"description\": \"My Dockerized service\",\n  \"source\": \"https://github.com/agent-ix/my-service\",\n  \"version\": \"1.2.3\"\n}\n```\n\n---\n\n## 🧑‍👷 Example Integration\n\n```yaml\n- uses: ./pull\n  with:\n    registry_user: ${{ secrets.REGISTRY_USER }}\n    registry_password: ${{ secrets.REGISTRY_PASSWORD }}\n\n- uses: ./build\n  with:\n    registry_user: ${{ secrets.REGISTRY_USER }}\n    registry_password: ${{ secrets.REGISTRY_PASSWORD }}\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n",
  "bytes": 6238,
  "sha": "e0feb9eb4ba74bb678134d29023627f7ea7fc3dac0cfbba73a3dc16213876f69",
  "repo_slug": "agent-ix/docker-actions",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/okf_agent_ix_docker_actions_spec_index_md_1d77b650/readme"
}