mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 03:23:59 +00:00
* docs: update documentation * feat: validate-inputs has it's own pyproject * security: mask DOCKERHUB_PASSWORD * chore: add tokens, checkout, recrete docs, integration tests * fix: add `statuses: write` permission to pr-lint
120 lines
4.4 KiB
Markdown
120 lines
4.4 KiB
Markdown
# ivuorinen/actions/docker-publish
|
|
|
|
## Docker Publish
|
|
|
|
### Description
|
|
|
|
Publish a Docker image to GitHub Packages and Docker Hub.
|
|
|
|
### Inputs
|
|
|
|
| name | description | required | default |
|
|
|-------------------------|-------------------------------------------------------------------|----------|----------------------------------------|
|
|
| `registry` | <p>Registry to publish to (dockerhub, github, or both).</p> | `true` | `both` |
|
|
| `nightly` | <p>Is this a nightly build? (true or false)</p> | `false` | `false` |
|
|
| `platforms` | <p>Platforms to build for (comma-separated)</p> | `false` | `linux/amd64,linux/arm64,linux/arm/v7` |
|
|
| `auto-detect-platforms` | <p>Automatically detect and build for all available platforms</p> | `false` | `false` |
|
|
| `scan-image` | <p>Scan images for vulnerabilities</p> | `false` | `true` |
|
|
| `sign-image` | <p>Sign images with cosign</p> | `false` | `false` |
|
|
| `cache-mode` | <p>Cache mode for build layers (min, max, or inline)</p> | `false` | `max` |
|
|
| `buildx-version` | <p>Specific Docker Buildx version to use</p> | `false` | `latest` |
|
|
| `verbose` | <p>Enable verbose logging</p> | `false` | `false` |
|
|
| `dockerhub-username` | <p>Docker Hub username for authentication</p> | `false` | `""` |
|
|
| `dockerhub-password` | <p>Docker Hub password or access token for authentication</p> | `false` | `""` |
|
|
| `token` | <p>GitHub token for authentication</p> | `false` | `""` |
|
|
|
|
### Outputs
|
|
|
|
| name | description |
|
|
|-------------------|-------------------------------------------------------|
|
|
| `registry` | <p>Registry where image was published</p> |
|
|
| `tags` | <p>Tags that were published</p> |
|
|
| `build-time` | <p>Total build time in seconds</p> |
|
|
| `platform-matrix` | <p>Build status per platform</p> |
|
|
| `scan-results` | <p>Vulnerability scan results if scanning enabled</p> |
|
|
| `image-id` | <p>Published image ID</p> |
|
|
| `image-digest` | <p>Published image digest</p> |
|
|
| `repository` | <p>Repository where image was published</p> |
|
|
|
|
### Runs
|
|
|
|
This action is a `composite` action.
|
|
|
|
### Usage
|
|
|
|
```yaml
|
|
- uses: ivuorinen/actions/docker-publish@main
|
|
with:
|
|
registry:
|
|
# Registry to publish to (dockerhub, github, or both).
|
|
#
|
|
# Required: true
|
|
# Default: both
|
|
|
|
nightly:
|
|
# Is this a nightly build? (true or false)
|
|
#
|
|
# Required: false
|
|
# Default: false
|
|
|
|
platforms:
|
|
# Platforms to build for (comma-separated)
|
|
#
|
|
# Required: false
|
|
# Default: linux/amd64,linux/arm64,linux/arm/v7
|
|
|
|
auto-detect-platforms:
|
|
# Automatically detect and build for all available platforms
|
|
#
|
|
# Required: false
|
|
# Default: false
|
|
|
|
scan-image:
|
|
# Scan images for vulnerabilities
|
|
#
|
|
# Required: false
|
|
# Default: true
|
|
|
|
sign-image:
|
|
# Sign images with cosign
|
|
#
|
|
# Required: false
|
|
# Default: false
|
|
|
|
cache-mode:
|
|
# Cache mode for build layers (min, max, or inline)
|
|
#
|
|
# Required: false
|
|
# Default: max
|
|
|
|
buildx-version:
|
|
# Specific Docker Buildx version to use
|
|
#
|
|
# Required: false
|
|
# Default: latest
|
|
|
|
verbose:
|
|
# Enable verbose logging
|
|
#
|
|
# Required: false
|
|
# Default: false
|
|
|
|
dockerhub-username:
|
|
# Docker Hub username for authentication
|
|
#
|
|
# Required: false
|
|
# Default: ""
|
|
|
|
dockerhub-password:
|
|
# Docker Hub password or access token for authentication
|
|
#
|
|
# Required: false
|
|
# Default: ""
|
|
|
|
token:
|
|
# GitHub token for authentication
|
|
#
|
|
# Required: false
|
|
# Default: ""
|
|
```
|