mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-16 17:02:36 +00:00
Merge branch 'main' into ci/validate
This commit is contained in:
commit
a5ccff75a0
4 changed files with 20 additions and 4 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -10,7 +10,7 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
RENOVATE_VERSION: 42.54.1 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
|
||||
RENOVATE_VERSION: 42.55.0 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
"typescript": "5.9.3",
|
||||
"typescript-eslint": "8.48.1"
|
||||
},
|
||||
"packageManager": "pnpm@10.24.0",
|
||||
"packageManager": "pnpm@10.25.0",
|
||||
"engines": {
|
||||
"node": "^20.9.0 || ^22.11.0 || ^24.11.0",
|
||||
"pnpm": "^10.0.0"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue