31 lines
1.8 KiB
Markdown
31 lines
1.8 KiB
Markdown
# container-update-checker
|
|
[](https://woodpecker.narvas.tech/vista/container-update-checker)
|
|
|
|
check if a container needs rebuilding
|
|
|
|
## Environment variables
|
|
| Name | Comment
|
|
|-------------------|-----------
|
|
| BASE | the image the Dockerfile is based on
|
|
| TARGET | the image thats based of `BASE`
|
|
| REGISTRY_USERNAME | the username for logging in into the registry<br>this is only requered of private repos
|
|
| REGISTRY_PASSWORD | the password for logging in into the registry<br>(*you probaly want to use a token here*)
|
|
| REGISTRY_API | the type of registry valid options are `docker` and `gitea`<br>Default: `docker`
|
|
| REGISTRY_URL | the url to the registry<br>Default: `https://hub.docker.com`
|
|
| BASE_REGISTRY_USERNAME | if left empty `REGISTRY_USERNAME` is used
|
|
| BASE_REGISTRY_PASSWORD | if left empty `REGISTRY_PASSWORD` is used
|
|
| BASE_REGISTRY_API | if left empty `REGISTRY_API` is used
|
|
| BASE_REGISTRY_URL | if left empty `REGISTRY_URL` is used
|
|
| TARGET_REGISTRY_USERNAME | if left empty `REGISTRY_USERNAME` is used
|
|
| TARGET_REGISTRY_PASSWORD | if left empty `REGISTRY_PASSWORD` is used
|
|
| TARGET_REGISTRY_API | if left empty `REGISTRY_API` is used
|
|
| TARGET_REGISTRY_URL | if left empty `REGISTRY_URL` is used
|
|
|
|
|
|
## Exit codes
|
|
|
|
| State | Exit code | Comment
|
|
|-------------------------------------|-----------|--------
|
|
| `BASE` is more recent than `TARGET` | 0 | An update is needed
|
|
| `TARGET` is more recent than `BASE` | 1 | No update is needed<br>(*the pipeline wil "fail" but that is wat we want* )
|
|
| An error occured | 0 | So the pipeline can continue |