|
| 1 | +--- |
| 2 | +title: Setup |
| 3 | +source_repo: hoverkraft-tech/ci-github-container |
| 4 | +source_path: actions/docker/setup/README.md |
| 5 | +source_branch: main |
| 6 | +source_run_id: 23001397843 |
| 7 | +last_synced: 2026-03-12T12:19:25.999Z |
| 8 | +--- |
| 9 | + |
| 10 | +<!-- header:start --> |
| 11 | + |
| 12 | +#  GitHub Action: Docker - Setup |
| 13 | + |
| 14 | +<div align="center"> |
| 15 | + <img src="/ci-github-container/assets/github/logo.svg" width="60px" align="center" alt="Docker - Setup" /> |
| 16 | +</div> |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +<!-- header:end --> |
| 21 | +<!-- badges:start --> |
| 22 | + |
| 23 | +[](https://github.com/marketplace/actions/docker---setup) |
| 24 | +[](https://github.com/hoverkraft-tech/ci-github-container/releases) |
| 25 | +[](http://choosealicense.com/licenses/mit/) |
| 26 | +[](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-container?style=social) |
| 27 | +[](https://github.com/hoverkraft-tech/ci-github-container/blob/main/CONTRIBUTING.md) |
| 28 | + |
| 29 | +<!-- badges:end --> |
| 30 | +<!-- overview:start --> |
| 31 | + |
| 32 | +## Overview |
| 33 | + |
| 34 | +Shared action to configure Docker tooling and OCI registry authentication. |
| 35 | + |
| 36 | +<!-- overview:end --> |
| 37 | +<!-- usage:start --> |
| 38 | + |
| 39 | +## Usage |
| 40 | + |
| 41 | +```yaml |
| 42 | +- uses: hoverkraft-tech/ci-github-container/actions/docker/setup@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6 |
| 43 | + with: |
| 44 | + # OCI registry configuration used to pull, push and cache images. |
| 45 | + # Accepts either a registry hostname string (default format) or a JSON object. |
| 46 | + # JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` |
| 47 | + # |
| 48 | + # This input is required. |
| 49 | + # Default: `ghcr.io` |
| 50 | + oci-registry: ghcr.io |
| 51 | + |
| 52 | + # Username configuration used to log against OCI registries. |
| 53 | + # Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. |
| 54 | + oci-registry-username: "" |
| 55 | + |
| 56 | + # Password or personal access token configuration used to log against OCI registries. |
| 57 | + # Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. |
| 58 | + oci-registry-password: "" |
| 59 | + |
| 60 | + # Optional built images payload used to resolve manifest publication registries. |
| 61 | + # When provided, registry authentication targets are inferred from the built image data. |
| 62 | + built-images: "" |
| 63 | + |
| 64 | + # Whether to install and configure Docker Buildx. |
| 65 | + # |
| 66 | + # Default: `true` |
| 67 | + setup-buildx: true |
| 68 | +``` |
| 69 | +
|
| 70 | +<!-- usage:end --> |
| 71 | +<!-- inputs:start --> |
| 72 | +
|
| 73 | +## Inputs |
| 74 | +
|
| 75 | +| **Input** | **Description** | **Required** | **Default** | |
| 76 | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | |
| 77 | +| **`oci-registry`** | OCI registry configuration used to pull, push and cache images. | **true** | `ghcr.io` | |
| 78 | +| | Accepts either a registry hostname string (default format) or a JSON object. | | | |
| 79 | +| | JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` | | | |
| 80 | +| **`oci-registry-username`** | Username configuration used to log against OCI registries. | **false** | - | |
| 81 | +| | Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. | | | |
| 82 | +| **`oci-registry-password`** | Password or personal access token configuration used to log against OCI registries. | **false** | - | |
| 83 | +| | Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. | | | |
| 84 | +| **`built-images`** | Optional built images payload used to resolve manifest publication registries. | **false** | - | |
| 85 | +| | When provided, registry authentication targets are inferred from the built image data. | | | |
| 86 | +| **`setup-buildx`** | Whether to install and configure Docker Buildx. | **false** | `true` | |
| 87 | + |
| 88 | +<!-- inputs:end --> |
| 89 | +<!-- secrets:start --> |
| 90 | +<!-- secrets:end --> |
| 91 | +<!-- outputs:start --> |
| 92 | + |
| 93 | +## Outputs |
| 94 | + |
| 95 | +| **Output** | **Description** | |
| 96 | +| --------------------- | -------------------------------------------------- | |
| 97 | +| **`push-registry`** | Registry used for published images/manifests. | |
| 98 | +| **`cache-registry`** | Registry used for registry-backed build cache. | |
| 99 | +| **`pull-registries`** | JSON array of registries used to pull base images. | |
| 100 | +| **`buildx-name`** | Docker Buildx builder name. | |
| 101 | + |
| 102 | +<!-- outputs:end --> |
| 103 | +<!-- examples:start --> |
| 104 | +<!-- examples:end --> |
| 105 | +<!-- contributing:start --> |
| 106 | + |
| 107 | +## Contributing |
| 108 | + |
| 109 | +Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-container/blob/main/CONTRIBUTING.md) for more details. |
| 110 | + |
| 111 | +<!-- contributing:end --> |
| 112 | +<!-- security:start --> |
| 113 | +<!-- security:end --> |
| 114 | +<!-- license:start --> |
| 115 | + |
| 116 | +## License |
| 117 | + |
| 118 | +This project is licensed under the MIT License. |
| 119 | + |
| 120 | +SPDX-License-Identifier: MIT |
| 121 | + |
| 122 | +Copyright © 2026 hoverkraft |
| 123 | + |
| 124 | +For more details, see the [license](http://choosealicense.com/licenses/mit/). |
| 125 | + |
| 126 | +<!-- license:end --> |
| 127 | +<!-- generated:start --> |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +This documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor). |
| 132 | + |
| 133 | +<!-- generated:end --> |
0 commit comments