diff --git a/.github/workflows/docker-build-images.md b/.github/workflows/docker-build-images.md index 29311ac3..7e7b9243 100644 --- a/.github/workflows/docker-build-images.md +++ b/.github/workflows/docker-build-images.md @@ -53,7 +53,9 @@ jobs: uses: hoverkraft-tech/ci-github-container/.github/workflows/docker-build-images.yml@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6 permissions: {} secrets: - # Password or GitHub token (`packages:read` and `packages:write` scopes) used to log against the OCI registry. + # Password or GitHub token (`packages:read` and `packages:write` scopes) configuration used to log against OCI registries. + # Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. + # JSON example: `{"pull:private":"$\{{ github.token }}","push":"$\{{ github.token }}"}` # See https://github.com/docker/login-action#usage. # # This input is required. @@ -74,17 +76,21 @@ jobs: runs-on: '["ubuntu-latest"]' # OCI registry configuration used to pull, push and cache images. - # Accepts either a registry hostname string or a JSON object with - # `pull`, `pull:`, `push` and `cache` keys. - # Example: - # `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` + # Accepts either a registry hostname string (default format) or a JSON object. + # JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` + # JSON object keys: + # - `pull`: registry used to pull public or default base images + # - `pull:`: additional pull registry + # - `push`: registry used for published images + # - `cache`: registry used when `cache-type` is `registry` + # If no `pull` key is provided, the `push` registry is also used for pulls. + # # Default: `ghcr.io` oci-registry: ghcr.io # Username configuration used to log against OCI registries. - # Accepts either a single username string or a JSON object using the same keys as `oci-registry`. - # Example: - # `{"pull:private":"${{ github.repository_owner }}","push":"${{ github.repository_owner }}"}` + # Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. + # JSON example: `{"pull:private":"$\{{ github.repository_owner }}","push":"$\{{ github.repository_owner }}"}` # See https://github.com/docker/login-action#usage. # # Default: `${{ github.repository_owner }}` @@ -173,9 +179,17 @@ jobs: | **`runs-on`** | Runner to use. JSON array of runners. | **false** | **string** | `["ubuntu-latest"]` | | | See . | | | | | **`oci-registry`** | OCI registry configuration used to pull, push and cache images. | **false** | **string** | `ghcr.io` | -| | Accepts a single registry hostname or a JSON object with `pull`, `pull:`, `push` and `cache` keys. | | | | +| | Accepts either a registry hostname string (default format) or a JSON object. | | | | +| | JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` | | | | +| | JSON object keys: | | | | +| | - `pull`: registry used to pull public or default base images | | | | +| | - `pull:`: additional pull registry | | | | +| | - `push`: registry used for published images | | | | +| | - `cache`: registry used when `cache-type` is `registry` | | | | +| | If no `pull` key is provided, the `push` registry is also used for pulls. | | | | | **`oci-registry-username`** | Username configuration used to log against OCI registries. | **false** | **string** | `${{ github.repository_owner }}` | -| | Accepts a single username or a JSON object using the same keys as `oci-registry`. | | | | +| | Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. | | | | +| | JSON example: `{"pull:private":"$\{{ github.repository_owner }}","push":"$\{{ github.repository_owner }}"}` | | | | | | See . | | | | | **`images`** | Images to build parameters. | **true** | **string** | - | | | JSON array of objects. | | | | @@ -205,7 +219,8 @@ jobs: | **Secret** | **Description** | **Required** | | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------ | | **`oci-registry-password`** | Password or GitHub token (`packages:read` and `packages:write` scopes) configuration used to log against OCI registries. | **true** | -| | Accepts a single password/token or a JSON object using the same keys as `oci-registry`. | | +| | Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. | | +| | JSON example: `{"pull:private":"$\{{ github.token }}","push":"$\{{ github.token }}"}` | | | | See . | | | **`build-secrets`** | List of secrets to expose to the build. | **false** | | | See . | | diff --git a/actions/docker/build-image/README.md b/actions/docker/build-image/README.md index deba1257..91ba6301 100644 --- a/actions/docker/build-image/README.md +++ b/actions/docker/build-image/README.md @@ -49,18 +49,23 @@ permissions: - uses: hoverkraft-tech/ci-github-container/actions/docker/build-image@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6 with: # OCI registry configuration used to pull, push and cache images. - # Accepts either a registry hostname string or a JSON object with - # `pull`, `pull:`, `push` and `cache` keys. - # Example: - # `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` + # Accepts either a registry hostname string (default format) or a JSON object. + # JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` + # JSON object keys: + # - `pull`: registry used to pull public or default base images + # - `pull:`: additional pull registry + # - `push`: registry used for published images + # - `cache`: registry used when `cache-type` is `registry` + # If no `pull` key is provided, the `push` registry is also used for pulls. + # # This input is required. # Default: `ghcr.io` oci-registry: ghcr.io # Username configuration used to log against OCI registries. - # Accepts either a single username string or a JSON object using the same keys as `oci-registry`. - # Example: - # `{"pull:private":"${{ github.repository_owner }}","push":"${{ github.repository_owner }}"}` + # Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. + # JSON example: + # `{"pull:private":"$\{{ github.repository_owner }}","push":"$\{{ github.repository_owner }}"}` # See https://github.com/docker/login-action#usage. # # This input is required. @@ -68,9 +73,8 @@ permissions: oci-registry-username: ${{ github.repository_owner }} # Password or personal access token configuration used to log against OCI registries. - # Accepts either a single password/token string or a JSON object using the same keys as `oci-registry`. - # Example: - # `{"pull:private":"${{ github.token }}","push":"${{ github.token }}"}` + # Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. + # JSON example: `{"pull:private":"$\{{ github.token }}","push":"$\{{ github.token }}"}` # Can be passed in using `secrets.GITHUB_TOKEN`. # See https://github.com/docker/login-action#usage. # @@ -145,43 +149,53 @@ permissions: ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| --------------------------- | -------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------- | -| **`oci-registry`** | OCI registry configuration used to pull, push and cache images. | **true** | `ghcr.io` | -| | Accepts a single registry hostname or a JSON object with `pull`, `pull:`, `push` and `cache` keys. | | | -| **`oci-registry-username`** | Username configuration used to log against OCI registries. | **true** | `${{ github.repository_owner }}` | -| | Accepts a single username or a JSON object using the same keys as `oci-registry`. | | | -| | See . | | | -| **`oci-registry-password`** | Password or personal access token configuration used to log against OCI registries. | **true** | `${{ github.token }}` | -| | Accepts a single password/token or a JSON object using the same keys as `oci-registry`. | | | -| | Can be passed in using `secrets.GITHUB_TOKEN`. | | | -| | See . | | | -| **`repository`** | Repository name. | **false** | `${{ github.repository }}` | -| | Example: `my-org/my-repo`. | | | -| | See [Docker get-image-metadata action](../get-image-metadata/README.md). | | | -| **`image`** | Additional image name. | **false** | - | -| | Example: `application`. | | | -| | See [Docker get-image-metadata action](../get-image-metadata/README.md). | | | -| **`tag`** | Force image tag to publish | **false** | - | -| **`platform`** | Platform to build for. Example: `linux/amd64`. | **true** | - | -| | See . | | | -| **`context`** | Build's context is the set of files located in the specified PATH or URL. | **false** | `.` | -| | See . | | | -| **`dockerfile`** | Location of Dockerfile (defaults to Dockerfile). | **false** | `Dockerfile` | -| | See . | | | -| **`build-args`** | List of build-time variables. | **false** | - | -| | See . | | | -| **`target`** | Sets the target stage to build. | **false** | - | -| | See . | | | -| **`secrets`** | List of secrets to expose to the build. | **false** | - | -| | See . | | | -| **`secret-envs`** | List of secret environment variables to expose to the build (e.g., `key=envname, MY_SECRET=MY_ENV_VAR`). | **false** | - | -| | See . | | | -| **`cache-type`** | Cache type. | **false** | `gha` | -| | See . | | | -| **`multi-platform`** | Whether this build participates in a multi-platform image publication. | **false** | `false` | -| | When true, the image is pushed by digest only so manifests can be assembled later. | | | -| | When false, the image is pushed with its tags directly. | | | +| **Input** | **Description** | **Required** | **Default** | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------- | +| **`oci-registry`** | OCI registry configuration used to pull, push and cache images. | **true** | `ghcr.io` | +| | Accepts either a registry hostname string (default format) or a JSON object. | | | +| | JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` | | | +| | JSON object keys: | | | +| | - `pull`: registry used to pull public or default base images | | | +| | - `pull:`: additional pull registry | | | +| | - `push`: registry used for published images | | | +| | - `cache`: registry used when `cache-type` is `registry` | | | +| | If no `pull` key is provided, the `push` registry is also used for pulls. | | | +| **`oci-registry-username`** | Username configuration used to log against OCI registries. | **true** | `${{ github.repository_owner }}` | +| | Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. | | | +| | JSON example: | | | +| | `{"pull:private":"$\{{ github.repository_owner }}","push":"$\{{ github.repository_owner }}"}` | | | +| | See . | | | +| **`oci-registry-password`** | Password or personal access token configuration used to log against OCI registries. | **true** | `${{ github.token }}` | +| | Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. | | | +| | JSON example: `{"pull:private":"$\{{ github.token }}","push":"$\{{ github.token }}"}` | | | +| | Can be passed in using `secrets.GITHUB_TOKEN`. | | | +| | See . | | | +| **`repository`** | Repository name. | **false** | `${{ github.repository }}` | +| | Example: `my-org/my-repo`. | | | +| | See [Docker get-image-metadata action](../get-image-metadata/README.md). | | | +| **`image`** | Additional image name. | **false** | - | +| | Example: `application`. | | | +| | See [Docker get-image-metadata action](../get-image-metadata/README.md). | | | +| **`tag`** | Force image tag to publish | **false** | - | +| **`platform`** | Platform to build for. Example: `linux/amd64`. | **true** | - | +| | See . | | | +| **`context`** | Build's context is the set of files located in the specified PATH or URL. | **false** | `.` | +| | See . | | | +| **`dockerfile`** | Location of Dockerfile (defaults to Dockerfile). | **false** | `Dockerfile` | +| | See . | | | +| **`build-args`** | List of build-time variables. | **false** | - | +| | See . | | | +| **`target`** | Sets the target stage to build. | **false** | - | +| | See . | | | +| **`secrets`** | List of secrets to expose to the build. | **false** | - | +| | See . | | | +| **`secret-envs`** | List of secret environment variables to expose to the build (e.g., `key=envname, MY_SECRET=MY_ENV_VAR`). | **false** | - | +| | See . | | | +| **`cache-type`** | Cache type. | **false** | `gha` | +| | See . | | | +| **`multi-platform`** | Whether this build participates in a multi-platform image publication. | **false** | `false` | +| | When true, the image is pushed by digest only so manifests can be assembled later. | | | +| | When false, the image is pushed with its tags directly. | | | diff --git a/actions/docker/create-images-manifests/README.md b/actions/docker/create-images-manifests/README.md index d5f66dcd..100edf39 100644 --- a/actions/docker/create-images-manifests/README.md +++ b/actions/docker/create-images-manifests/README.md @@ -48,27 +48,30 @@ permissions: - uses: hoverkraft-tech/ci-github-container/actions/docker/create-images-manifests@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6 with: # OCI registry configuration used to pull, push and cache images. - # Accepts either a registry hostname string or a JSON object with - # `pull`, `pull:`, `push` and `cache` keys. - # Example: - # `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` + # Accepts either a registry hostname string (default format) or a JSON object. + # JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` + # JSON object keys: + # - `pull`: registry used to pull public or default base images + # - `pull:`: additional pull registry + # - `push`: registry used for published images + # - `cache`: registry used when `cache-type` is `registry` + # # This input is required. # Default: `ghcr.io` oci-registry: ghcr.io # Username configuration used to log against OCI registries. - # Accepts either a single username string or a JSON object using the same keys as `oci-registry`. - # Example: - # `{"pull:private":"${{ github.repository_owner }}","push":"${{ github.repository_owner }}"}` + # Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. + # JSON example: `{"pull:private":"$\{{ github.repository_owner }}","push":"$\{{ github.repository_owner }}"}` # See https://github.com/docker/login-action#usage. + # # This input is required. # Default: `${{ github.repository_owner }}` oci-registry-username: ${{ github.repository_owner }} # Password or personal access token configuration used to log against OCI registries. - # Accepts either a single password/token string or a JSON object using the same keys as `oci-registry`. - # Example: - # `{"pull:private":"${{ github.token }}","push":"${{ github.token }}"}` + # Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. + # JSON example: `{"pull:private":"$\{{ github.token }}","push":"$\{{ github.token }}"}` # Can be passed in using `secrets.GITHUB_TOKEN`. # See https://github.com/docker/login-action#usage. # @@ -114,11 +117,20 @@ permissions: | **Input** | **Description** | **Required** | **Default** | | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------- | | **`oci-registry`** | OCI registry configuration used to pull, push and cache images. | **true** | `ghcr.io` | -| | Accepts a single registry hostname or a JSON object with `pull`, `pull:`, `push` and `cache` keys. | | | -| **`oci-registry-username`** | Username configuration used to log against OCI registries. See . | **true** | `${{ github.repository_owner }}` | -| | Accepts a single username or a JSON object using the same keys as `oci-registry`. | | | +| | Accepts either a registry hostname string (default format) or a JSON object. | | | +| | JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` | | | +| | JSON object keys: | | | +| | - `pull`: registry used to pull public or default base images | | | +| | - `pull:`: additional pull registry | | | +| | - `push`: registry used for published images | | | +| | - `cache`: registry used when `cache-type` is `registry` | | | +| **`oci-registry-username`** | Username configuration used to log against OCI registries. | **true** | `${{ github.repository_owner }}` | +| | Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. | | | +| | JSON example: `{"pull:private":"$\{{ github.repository_owner }}","push":"$\{{ github.repository_owner }}"}` | | | +| | See . | | | | **`oci-registry-password`** | Password or personal access token configuration used to log against OCI registries. | **true** | `${{ github.token }}` | -| | Accepts a single password/token or a JSON object using the same keys as `oci-registry`. | | | +| | Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. | | | +| | JSON example: `{"pull:private":"$\{{ github.token }}","push":"$\{{ github.token }}"}` | | | | | Can be passed in using `secrets.GITHUB_TOKEN`. | | | | | See . | | | | **`built-images`** | Built images data. | **true** | - | diff --git a/actions/docker/setup/README.md b/actions/docker/setup/README.md index cc6f87d3..8db08db9 100644 --- a/actions/docker/setup/README.md +++ b/actions/docker/setup/README.md @@ -30,7 +30,7 @@ Shared action to configure Docker tooling and OCI registry authentication. ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-container/actions/docker/setup@b6cc2773aa9e7d7362b9e16b9032fefd399e7df6 # copilot/add-multiple-registry-support +- uses: hoverkraft-tech/ci-github-container/actions/docker/setup@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6 with: # OCI registry configuration used to pull, push and cache images. # Accepts either a registry hostname string (default format) or a JSON object.