mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-16 17:02:36 +00:00
chore(release): 40.1.0 [skip ci]
This commit is contained in:
parent
75c3a406a5
commit
2d90417499
2 changed files with 16 additions and 9 deletions
23
dist/index.js
vendored
23
dist/index.js
vendored
|
|
@ -26153,7 +26153,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const docker_1 = __importDefault(__nccwpck_require__(5762));
|
const docker_1 = __importDefault(__nccwpck_require__(5762));
|
||||||
const exec_1 = __nccwpck_require__(7775);
|
const exec_1 = __nccwpck_require__(7775);
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const promises_1 = __importDefault(__nccwpck_require__(3292));
|
||||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||||
class Renovate {
|
class Renovate {
|
||||||
input;
|
input;
|
||||||
|
|
@ -26162,10 +26162,10 @@ class Renovate {
|
||||||
docker;
|
docker;
|
||||||
constructor(input) {
|
constructor(input) {
|
||||||
this.input = input;
|
this.input = input;
|
||||||
this.validateArguments();
|
|
||||||
this.docker = new docker_1.default(input);
|
this.docker = new docker_1.default(input);
|
||||||
}
|
}
|
||||||
async runDockerContainer() {
|
async runDockerContainer() {
|
||||||
|
await this.validateArguments();
|
||||||
const dockerArguments = this.input
|
const dockerArguments = this.input
|
||||||
.toEnvironmentVariables()
|
.toEnvironmentVariables()
|
||||||
.map((e) => `--env ${e.key}`)
|
.map((e) => `--env ${e.key}`)
|
||||||
|
|
@ -26177,7 +26177,7 @@ class Renovate {
|
||||||
dockerArguments.push(`--env ${configurationFile.key}=${mountPath}`, `--volume ${configurationFile.value}:${mountPath}`);
|
dockerArguments.push(`--env ${configurationFile.key}=${mountPath}`, `--volume ${configurationFile.value}:${mountPath}`);
|
||||||
}
|
}
|
||||||
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 ${await this.getDockerGroupId()}`);
|
||||||
}
|
}
|
||||||
const dockerCmdFile = this.input.getDockerCmdFile();
|
const dockerCmdFile = this.input.getDockerCmdFile();
|
||||||
let dockerCmd = null;
|
let dockerCmd = null;
|
||||||
|
|
@ -26210,9 +26210,9 @@ class Renovate {
|
||||||
* The Renovate container needs access to this group in order to have the
|
* The Renovate container needs access to this group in order to have the
|
||||||
* required permissions on the Docker socket.
|
* required permissions on the Docker socket.
|
||||||
*/
|
*/
|
||||||
getDockerGroupId() {
|
async getDockerGroupId() {
|
||||||
const groupFile = '/etc/group';
|
const groupFile = '/etc/group';
|
||||||
const groups = fs_1.default.readFileSync(groupFile, {
|
const groups = await promises_1.default.readFile(groupFile, {
|
||||||
encoding: 'utf-8',
|
encoding: 'utf-8',
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
|
|
@ -26227,14 +26227,13 @@ class Renovate {
|
||||||
}
|
}
|
||||||
return match.groups.groupId;
|
return match.groups.groupId;
|
||||||
}
|
}
|
||||||
validateArguments() {
|
async validateArguments() {
|
||||||
if (/\s/.test(this.input.token.value)) {
|
if (/\s/.test(this.input.token.value)) {
|
||||||
throw new Error('Token MUST NOT contain whitespace');
|
throw new Error('Token MUST NOT contain whitespace');
|
||||||
}
|
}
|
||||||
const configurationFile = this.input.configurationFile();
|
const configurationFile = this.input.configurationFile();
|
||||||
if (configurationFile !== null &&
|
if (configurationFile !== null &&
|
||||||
(!fs_1.default.existsSync(configurationFile.value) ||
|
!(await promises_1.default.stat(configurationFile.value)).isFile()) {
|
||||||
!fs_1.default.statSync(configurationFile.value).isFile())) {
|
|
||||||
throw new Error(`configuration file '${configurationFile.value}' MUST be an existing file`);
|
throw new Error(`configuration file '${configurationFile.value}' MUST be an existing file`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -26316,6 +26315,14 @@ module.exports = require("fs");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 3292:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
module.exports = require("fs/promises");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 3685:
|
/***/ 3685:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "github-action",
|
"name": "github-action",
|
||||||
"version": "40.0.3",
|
"version": "40.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "GitHub Action to run Renovate self-hosted.",
|
"description": "GitHub Action to run Renovate self-hosted.",
|
||||||
"homepage": "https://github.com/renovatebot/github-action#readme",
|
"homepage": "https://github.com/renovatebot/github-action#readme",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue