mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-17 01:12:35 +00:00
| datasource | package | from | to | | ---------- | ---------------------------- | ---- | -- | | docker | ghcr.io/renovatebot/renovate | 41 | 42 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
31 lines
797 B
TypeScript
31 lines
797 B
TypeScript
import type { Input } from './input';
|
|
import { warning } from '@actions/core';
|
|
|
|
export class Docker {
|
|
private static readonly image = 'ghcr.io/renovatebot/renovate';
|
|
private static readonly version = '42'; // renovate
|
|
|
|
private readonly dockerImage: string;
|
|
private readonly fullTag: string;
|
|
|
|
constructor(input: Input) {
|
|
let image = input.getDockerImage();
|
|
let version = input.getVersion();
|
|
|
|
if (!image) {
|
|
warning(`No Docker image specified, using ${Docker.image}`);
|
|
image = Docker.image;
|
|
}
|
|
if (!version) {
|
|
warning(`No Docker version specified, using ${Docker.version}`);
|
|
version = Docker.version;
|
|
}
|
|
|
|
this.dockerImage = image;
|
|
this.fullTag = version;
|
|
}
|
|
|
|
image(): string {
|
|
return `${this.dockerImage}:${this.fullTag}`;
|
|
}
|
|
}
|