mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-16 17:02:36 +00:00
chore(release): 39.1.0 [skip ci]
This commit is contained in:
parent
cc6668c47c
commit
89c8a9b60f
2 changed files with 23 additions and 1 deletions
22
dist/index.js
vendored
22
dist/index.js
vendored
|
|
@ -26978,6 +26978,13 @@ class Input {
|
||||||
mountDockerSocket() {
|
mountDockerSocket() {
|
||||||
return core.getInput('mount-docker-socket') === 'true';
|
return core.getInput('mount-docker-socket') === 'true';
|
||||||
}
|
}
|
||||||
|
getDockerCmdFile() {
|
||||||
|
const cmdFile = core.getInput('docker-cmd-file');
|
||||||
|
return !!cmdFile && cmdFile !== '' ? path_1.default.resolve(cmdFile) : null;
|
||||||
|
}
|
||||||
|
getDockerUser() {
|
||||||
|
return core.getInput('docker-user') || null;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Convert to environment variables.
|
* Convert to environment variables.
|
||||||
*
|
*
|
||||||
|
|
@ -27047,7 +27054,22 @@ class Renovate {
|
||||||
if (this.input.mountDockerSocket()) {
|
if (this.input.mountDockerSocket()) {
|
||||||
dockerArguments.push('--volume /var/run/docker.sock:/var/run/docker.sock', `--group-add ${this.getDockerGroupId()}`);
|
dockerArguments.push('--volume /var/run/docker.sock:/var/run/docker.sock', `--group-add ${this.getDockerGroupId()}`);
|
||||||
}
|
}
|
||||||
|
const dockerCmdFile = this.input.getDockerCmdFile();
|
||||||
|
let dockerCmd = null;
|
||||||
|
if (dockerCmdFile !== null) {
|
||||||
|
const baseName = path_1.default.basename(dockerCmdFile);
|
||||||
|
const mountPath = `/${baseName}`;
|
||||||
|
dockerArguments.push(`--volume ${dockerCmdFile}:${mountPath}`);
|
||||||
|
dockerCmd = mountPath;
|
||||||
|
}
|
||||||
|
const dockerUser = this.input.getDockerUser();
|
||||||
|
if (dockerUser !== null) {
|
||||||
|
dockerArguments.push(`--user ${dockerUser}`);
|
||||||
|
}
|
||||||
dockerArguments.push('--volume /tmp:/tmp', '--rm', this.docker.image());
|
dockerArguments.push('--volume /tmp:/tmp', '--rm', this.docker.image());
|
||||||
|
if (dockerCmd !== null) {
|
||||||
|
dockerArguments.push(dockerCmd);
|
||||||
|
}
|
||||||
const command = `docker run ${dockerArguments.join(' ')}`;
|
const command = `docker run ${dockerArguments.join(' ')}`;
|
||||||
const code = await (0, exec_1.exec)(command);
|
const code = await (0, exec_1.exec)(command);
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "github-action",
|
"name": "github-action",
|
||||||
"version": "39.0.6",
|
"version": "39.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "GitHub Action to run Renovate self-hosted.",
|
"description": "GitHub Action to run Renovate self-hosted.",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue