mirror of
https://github.com/renovatebot/github-action.git
synced 2026-12-06 03:42:57 +00:00
Co-authored-by: Oreste Di Modugno <oreste.dimodugno@adevinta.com> Co-authored-by: Rhys Arkins <rhys@arkins.net> Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
26 lines
545 B
TypeScript
26 lines
545 B
TypeScript
import type { Input } from './input';
|
|
|
|
class Docker {
|
|
private static readonly repository = 'renovate/renovate';
|
|
|
|
private readonly dockerImage: string;
|
|
private readonly fullTag: string;
|
|
|
|
constructor(input: Input) {
|
|
const tag = input.getVersion();
|
|
|
|
this.dockerImage = input.getDockerImage() ?? Docker.repository;
|
|
this.fullTag = input.useSlim()
|
|
? tag
|
|
? `${tag}-slim`
|
|
: 'slim'
|
|
: tag ?? 'latest';
|
|
}
|
|
|
|
image(): string {
|
|
return `${this.dockerImage}:${this.fullTag}`;
|
|
}
|
|
}
|
|
|
|
export default Docker;
|