skip: merge (fde0305037) [skip release]

This commit is contained in:
github-actions[bot] 2025-12-15 11:24:12 +00:00
commit 3f43cdaf4c
2 changed files with 18 additions and 2 deletions

View file

@ -1,12 +1,17 @@
import { group, notice, setFailed } from '@actions/core';
import { Input } from './input';
import { Renovate } from './renovate';
import { setFailed } from '@actions/core';
async function run(): Promise<void> {
try {
const input = new Input();
const renovate = new Renovate(input);
await group('Check Renovate version', async () => {
const version = await renovate.runDockerContainerForVersion();
notice(version, { title: 'Renovate CLI version' });
});
await renovate.runDockerContainer();
} catch (error) {
console.error(error);

View file

@ -1,6 +1,6 @@
import { exec, getExecOutput } from '@actions/exec';
import { Docker } from './docker';
import { Input } from './input';
import { exec } from '@actions/exec';
import fs from 'node:fs/promises';
import path from 'node:path';
@ -14,6 +14,17 @@ export class Renovate {
this.docker = new Docker(input);
}
async runDockerContainerForVersion(): Promise<string> {
const command = `docker run -t --rm ${this.docker.image()} --version`;
const { exitCode, stdout } = await getExecOutput(command);
if (exitCode !== 0) {
new Error(`'docker run' failed with exit code ${exitCode}.`);
}
return stdout.trim();
}
async runDockerContainer(): Promise<void> {
await this.validateArguments();