renovatebot-github/src/index.ts
Jamie Tanna fde0305037
feat: show Renovate CLI version more prominently in logs (#983)
As noted in #969, it would be useful to have a more prominent output in
the logs to indicate the version of the Renovate CLI being used.

This would help with both personal debugging (for administrators of the
GitHub Action) and for raising issues upstream.

To do this, we can call the `--version` on the CLI, capture the output
and report it back to the user.

By using a Notice annotation, we can then make it more visible at the
job- and step-level.

We can then also wrap it in a `group`, so it's hidden in its own
expandable group (with timing information).

Closes #969.
2025-12-15 11:21:29 +00:00

22 lines
580 B
TypeScript

import { group, notice, setFailed } from '@actions/core';
import { Input } from './input';
import { Renovate } from './renovate';
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);
setFailed(error as Error);
}
}
void run();