Initial draft of plugin.
All checks were successful
All checks were successful
This commit is contained in:
parent
500978a33f
commit
29bd3aa4d7
16 changed files with 735 additions and 0 deletions
63
README.md
Normal file
63
README.md
Normal file
|
@ -0,0 +1,63 @@
|
|||
# DockerHub Metadata WoodpeckerCI Plugin
|
||||
|
||||
[](https://hub.docker.com/r/kokuwaio/dockerhub-metadata)
|
||||
[](https://hub.docker.com/r/kokuwaio/dockerhub-metadata)
|
||||
[](https://git.kokuwa.io/woodpecker/dockerhub-metadata/src/branch/main/Dockerfile)
|
||||
[](https://git.kokuwa.io/woodpecker/dockerhub-metadata/src/branch/main/LICENSE)
|
||||
[](https://git.kokuwa.io/woodpecker/dockerhub-metadata/pulls)
|
||||
[](https://git.kokuwa.io/woodpecker/dockerhub-metadata/issues)
|
||||
|
||||
A [WoodpeckerCI](https://woodpecker-ci.org) plugin to write metadata to DockerHub repositories.
|
||||
Also usable with Gitlab, Github or locally, see examples for usage.
|
||||
|
||||
## Features
|
||||
|
||||
- set full description in repository from local file
|
||||
- set short description in repository from settings
|
||||
- set categories for repository
|
||||
|
||||
## Example
|
||||
|
||||
Woodpecker:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
dockerhub:
|
||||
image: kokuwaio/dockerhub-metadata
|
||||
settings:
|
||||
repository: kokuwaio/example-image
|
||||
description-short: This image does that!
|
||||
categories: [developer-tools, integration-and-delivery]
|
||||
username: {from_secret: DOCKERHUB_USERNAME}
|
||||
password: {from_secret: DOCKERHUB_PASSWORD}
|
||||
when:
|
||||
event: push
|
||||
branch: main
|
||||
path: README.md
|
||||
```
|
||||
|
||||
Gitlab:
|
||||
|
||||
```yaml
|
||||
dockerhub:
|
||||
stage: deploy
|
||||
image: kokuwaio/hadolint
|
||||
variables:
|
||||
PLUGIN_REPOSITORY: kokuwaio/example-image
|
||||
PLUGIN_DESCRIPTION_SHORT: This image does that!
|
||||
PLUGIN_CATEGORIES: developer-tools,integration-and-delivery
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
changes: [README.md]
|
||||
```
|
||||
|
||||
## Settings
|
||||
|
||||
| Settings Name | Environment | Default | Description |
|
||||
| ------------------- | ------------------------ | ----------- | ----------------------------------------------------------- |
|
||||
| `repository` | PLUGIN_REPOSITORY | `none` | Repository to update with metadata, e.g. `kokuwaio/example` |
|
||||
| `description-short` | PLUGIN_DESCRIPTION_SHORT | `none` | Short description for repository. |
|
||||
| `description-file` | PLUGIN_DESCRIPTION_FILE | `README.md` | File to read full description from |
|
||||
| `categories` | PLUGIN_CATEGORIES | `[]` | List of categories to set (maximum 3) |
|
||||
| `username` | PLUGIN_USERNAME | `none` | Username for Dockerhub login |
|
||||
| `password` | PLUGIN_PASSWORD | `none` | Password for Dockerhub login, **PAT** is not supported! |
|
Loading…
Add table
Add a link
Reference in a new issue