mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-17 17:32:35 +00:00
Merge branch 'main' into validate-cmd-file
This commit is contained in:
commit
f2fabc5e65
7 changed files with 135 additions and 59 deletions
13
.github/renovate.json
vendored
13
.github/renovate.json
vendored
|
|
@ -16,13 +16,12 @@
|
|||
},
|
||||
{
|
||||
"description": "Use build semantic type for some deps",
|
||||
"matchPackageNames": [
|
||||
"@vercel/ncc",
|
||||
"conventional-changelog-conventionalcommits",
|
||||
"semantic-release",
|
||||
"typescript"
|
||||
],
|
||||
"matchPackagePrefixes": ["@semantic-release/"],
|
||||
"matchPackageNames": ["@vercel/ncc", "typescript"],
|
||||
"semanticCommitType": "build"
|
||||
},
|
||||
{
|
||||
"description": "Use `build` semantic commit scope for lockfile maintenance",
|
||||
"matchUpdateTypes": ["lockFileMaintenance"],
|
||||
"semanticCommitType": "build"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -11,7 +11,7 @@ concurrency:
|
|||
|
||||
env:
|
||||
NODE_VERSION: 20
|
||||
RENOVATE_VERSION: 37.180.0 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
|
||||
RENOVATE_VERSION: 37.183.0 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"plugins": ["prettier-plugin-package"]
|
||||
"plugins": ["prettier-plugin-packagejson"]
|
||||
}
|
||||
|
|
|
|||
32
README.md
32
README.md
|
|
@ -101,7 +101,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
docker-cmd-file: .github/renovate-entrypoint.sh
|
||||
docker-user: root
|
||||
|
|
@ -131,7 +131,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
docker-volumes: |
|
||||
|
|
@ -183,7 +183,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
renovate-image: myproxyhub.domain.com/renovate/renovate
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
|
@ -200,7 +200,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
|
@ -211,7 +211,7 @@ The Renovate version to use.
|
|||
If omitted the action will use the `latest` Docker tag.
|
||||
Check [the available tags on Docker Hub](https://hub.docker.com/r/renovate/renovate/tags).
|
||||
|
||||
This sample will use `ghcr.io/renovatebot/renovate:37.172.2` image.
|
||||
This sample will use `ghcr.io/renovatebot/renovate:37.183.0` image.
|
||||
|
||||
```yml
|
||||
....
|
||||
|
|
@ -222,9 +222,9 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
renovate-version: 37.172.2
|
||||
renovate-version: 37.183.0
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
renovate-version: full
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
|
@ -274,7 +274,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
|
@ -287,7 +287,7 @@ If you want to use the Renovate Action on a GitHub Enterprise instance you have
|
|||
```yml
|
||||
....
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
|
@ -332,7 +332,7 @@ jobs:
|
|||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: '${{ steps.get_token.outputs.token }}'
|
||||
|
|
@ -355,7 +355,7 @@ For example if you wish to pass through some credentials for a [host rule](https
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
|
@ -392,7 +392,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
|
@ -483,11 +483,11 @@ jobs:
|
|||
sudo chown -R runneradmin:root /tmp/renovate/
|
||||
ls -R $cache_dir
|
||||
|
||||
- uses: renovatebot/github-action@v40.0.2
|
||||
- uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
configurationFile: renovate.json5
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
renovate-version: 37.172.2
|
||||
renovate-version: 37.183.0
|
||||
env:
|
||||
# This enables the cache -- if this is set, it's not necessary to add it to renovate.json.
|
||||
RENOVATE_REPOSITORY_CACHE: ${{ github.event.inputs.repoCache || 'enabled' }}
|
||||
|
|
@ -521,7 +521,7 @@ To enable debug logging, add the environment variable `LOG_LEVEL: 'debug'` to th
|
|||
|
||||
```yml
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.0.2
|
||||
uses: renovatebot/github-action@v40.0.3
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
|
|
|||
24
package.json
24
package.json
|
|
@ -3,21 +3,17 @@
|
|||
"version": "0.0.0-PLACEHOLDER",
|
||||
"private": true,
|
||||
"description": "GitHub Action to run Renovate self-hosted.",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/renovatebot/github-action.git"
|
||||
},
|
||||
"author": "Jeroen de Bruijn",
|
||||
"homepage": "https://github.com/renovatebot/github-action#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/renovatebot/github-action/issues"
|
||||
},
|
||||
"main": "src/index.ts",
|
||||
"engines": {
|
||||
"node": ">=20.9.0",
|
||||
"pnpm": "^8.0.0"
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/renovatebot/github-action.git"
|
||||
},
|
||||
"license": "GPL-3.0-or-later",
|
||||
"author": "Jeroen de Bruijn",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"build": "run-s clean compile",
|
||||
"clean": "rimraf dist/",
|
||||
|
|
@ -57,14 +53,18 @@
|
|||
"husky": "9.0.10",
|
||||
"lint-staged": "15.2.1",
|
||||
"npm-run-all2": "6.1.2",
|
||||
"prettier": "2.8.8",
|
||||
"prettier-plugin-package": "1.4.0",
|
||||
"prettier": "3.2.5",
|
||||
"prettier-plugin-packagejson": "2.4.10",
|
||||
"rimraf": "5.0.5",
|
||||
"semantic-release": "23.0.0",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.3.3"
|
||||
},
|
||||
"packageManager": "pnpm@8.15.1",
|
||||
"engines": {
|
||||
"node": ">=20.9.0",
|
||||
"pnpm": "^8.0.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"supportedArchitectures": {
|
||||
"os": [
|
||||
|
|
|
|||
104
pnpm-lock.yaml
generated
104
pnpm-lock.yaml
generated
|
|
@ -65,11 +65,11 @@ devDependencies:
|
|||
specifier: 6.1.2
|
||||
version: 6.1.2
|
||||
prettier:
|
||||
specifier: 2.8.8
|
||||
version: 2.8.8
|
||||
prettier-plugin-package:
|
||||
specifier: 1.4.0
|
||||
version: 1.4.0(prettier@2.8.8)
|
||||
specifier: 3.2.5
|
||||
version: 3.2.5
|
||||
prettier-plugin-packagejson:
|
||||
specifier: 2.4.10
|
||||
version: 2.4.10(prettier@3.2.5)
|
||||
rimraf:
|
||||
specifier: 5.0.5
|
||||
version: 5.0.5
|
||||
|
|
@ -529,6 +529,11 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@pkgr/core@0.1.1:
|
||||
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
|
||||
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@pnpm/config.env-replace@1.1.0:
|
||||
resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==}
|
||||
engines: {node: '>=12.22.0'}
|
||||
|
|
@ -1331,6 +1336,16 @@ packages:
|
|||
resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==}
|
||||
dev: true
|
||||
|
||||
/detect-indent@7.0.1:
|
||||
resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==}
|
||||
engines: {node: '>=12.20'}
|
||||
dev: true
|
||||
|
||||
/detect-newline@4.0.1:
|
||||
resolution: {integrity: sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/diff@4.0.2:
|
||||
resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==}
|
||||
engines: {node: '>=0.3.1'}
|
||||
|
|
@ -1719,6 +1734,11 @@ packages:
|
|||
engines: {node: '>=18'}
|
||||
dev: true
|
||||
|
||||
/get-stdin@9.0.0:
|
||||
resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/get-stream@6.0.1:
|
||||
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
|
||||
engines: {node: '>=10'}
|
||||
|
|
@ -1734,6 +1754,10 @@ packages:
|
|||
engines: {node: '>=16'}
|
||||
dev: true
|
||||
|
||||
/git-hooks-list@3.1.0:
|
||||
resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==}
|
||||
dev: true
|
||||
|
||||
/git-log-parser@1.2.0:
|
||||
resolution: {integrity: sha512-rnCVNfkTL8tdNryFuaY0fYiBWEBcgF748O6ZI61rslBvr2o7U65c2/6npCRqH40vuAhtgtDiqLTJjBVdrejCzA==}
|
||||
dependencies:
|
||||
|
|
@ -1820,6 +1844,17 @@ packages:
|
|||
slash: 3.0.0
|
||||
dev: true
|
||||
|
||||
/globby@13.2.2:
|
||||
resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dependencies:
|
||||
dir-glob: 3.0.1
|
||||
fast-glob: 3.3.2
|
||||
ignore: 5.3.1
|
||||
merge2: 1.4.1
|
||||
slash: 4.0.0
|
||||
dev: true
|
||||
|
||||
/globby@14.0.0:
|
||||
resolution: {integrity: sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
|
@ -2067,6 +2102,11 @@ packages:
|
|||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/is-plain-obj@4.1.0:
|
||||
resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/is-stream@2.0.1:
|
||||
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
|
||||
engines: {node: '>=8'}
|
||||
|
|
@ -2893,18 +2933,22 @@ packages:
|
|||
engines: {node: '>= 0.8.0'}
|
||||
dev: true
|
||||
|
||||
/prettier-plugin-package@1.4.0(prettier@2.8.8):
|
||||
resolution: {integrity: sha512-jy8UjgHadyznzWfunyjPQPqE2Y92TVF3Q0O829X6pk/ARoKn0vtSu+mtKIsmikZYb2N50mV6vRIqCf19XdOdIg==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
/prettier-plugin-packagejson@2.4.10(prettier@3.2.5):
|
||||
resolution: {integrity: sha512-qFzOfQDHi1tzvVJRuZ2jh1j6IFV5MURh5m5WDt+qfEMOf4SSL5RpwSysiX8u0W1PJYsM0vKJGNULt43wwteKiQ==}
|
||||
peerDependencies:
|
||||
prettier: ^2.0.0 || ^3.0.0
|
||||
prettier: '>= 1.16.0'
|
||||
peerDependenciesMeta:
|
||||
prettier:
|
||||
optional: true
|
||||
dependencies:
|
||||
prettier: 2.8.8
|
||||
prettier: 3.2.5
|
||||
sort-package-json: 2.7.0
|
||||
synckit: 0.9.0
|
||||
dev: true
|
||||
|
||||
/prettier@2.8.8:
|
||||
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
/prettier@3.2.5:
|
||||
resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
|
|
@ -3230,6 +3274,11 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/slash@4.0.0:
|
||||
resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/slash@5.1.0:
|
||||
resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==}
|
||||
engines: {node: '>=14.16'}
|
||||
|
|
@ -3251,6 +3300,23 @@ packages:
|
|||
is-fullwidth-code-point: 5.0.0
|
||||
dev: true
|
||||
|
||||
/sort-object-keys@1.1.3:
|
||||
resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==}
|
||||
dev: true
|
||||
|
||||
/sort-package-json@2.7.0:
|
||||
resolution: {integrity: sha512-6AayF8bp6L+WROgpbhTMUtB9JSFmpGHjmW7DyaNPS1HwlTw2oSVlUUtlkHSEZmg5o89F3zvLBZNvMeZ1T4fjQg==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
detect-indent: 7.0.1
|
||||
detect-newline: 4.0.1
|
||||
get-stdin: 9.0.0
|
||||
git-hooks-list: 3.1.0
|
||||
globby: 13.2.2
|
||||
is-plain-obj: 4.1.0
|
||||
sort-object-keys: 1.1.3
|
||||
dev: true
|
||||
|
||||
/source-map@0.6.1:
|
||||
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
|
@ -3423,6 +3489,14 @@ packages:
|
|||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/synckit@0.9.0:
|
||||
resolution: {integrity: sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
dependencies:
|
||||
'@pkgr/core': 0.1.1
|
||||
tslib: 2.6.2
|
||||
dev: true
|
||||
|
||||
/temp-dir@3.0.0:
|
||||
resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==}
|
||||
engines: {node: '>=14.16'}
|
||||
|
|
@ -3521,6 +3595,10 @@ packages:
|
|||
yn: 3.1.1
|
||||
dev: true
|
||||
|
||||
/tslib@2.6.2:
|
||||
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
|
||||
dev: true
|
||||
|
||||
/tunnel@0.0.6:
|
||||
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
|
||||
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import Docker from './docker';
|
||||
import { Input } from './input';
|
||||
import { exec } from '@actions/exec';
|
||||
import fs from 'fs';
|
||||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
|
||||
class Renovate {
|
||||
|
|
@ -11,12 +11,12 @@ class Renovate {
|
|||
private docker: Docker;
|
||||
|
||||
constructor(private input: Input) {
|
||||
this.validateArguments();
|
||||
|
||||
this.docker = new Docker(input);
|
||||
}
|
||||
|
||||
async runDockerContainer(): Promise<void> {
|
||||
await this.validateArguments();
|
||||
|
||||
const dockerArguments = this.input
|
||||
.toEnvironmentVariables()
|
||||
.map((e) => `--env ${e.key}`)
|
||||
|
|
@ -35,7 +35,7 @@ class Renovate {
|
|||
if (this.input.mountDockerSocket()) {
|
||||
dockerArguments.push(
|
||||
'--volume /var/run/docker.sock:/var/run/docker.sock',
|
||||
`--group-add ${this.getDockerGroupId()}`,
|
||||
`--group-add ${await this.getDockerGroupId()}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -77,9 +77,9 @@ class Renovate {
|
|||
* The Renovate container needs access to this group in order to have the
|
||||
* required permissions on the Docker socket.
|
||||
*/
|
||||
private getDockerGroupId(): string {
|
||||
private async getDockerGroupId(): Promise<string> {
|
||||
const groupFile = '/etc/group';
|
||||
const groups = fs.readFileSync(groupFile, {
|
||||
const groups = await fs.readFile(groupFile, {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ class Renovate {
|
|||
return match.groups.groupId;
|
||||
}
|
||||
|
||||
private validateArguments(): void {
|
||||
private async validateArguments(): Promise<void> {
|
||||
if (/\s/.test(this.input.token.value)) {
|
||||
throw new Error('Token MUST NOT contain whitespace');
|
||||
}
|
||||
|
|
@ -109,8 +109,7 @@ class Renovate {
|
|||
const configurationFile = this.input.configurationFile();
|
||||
if (
|
||||
configurationFile !== null &&
|
||||
(!fs.existsSync(configurationFile.value) ||
|
||||
!fs.statSync(configurationFile.value).isFile())
|
||||
!(await fs.stat(configurationFile.value)).isFile()
|
||||
) {
|
||||
throw new Error(
|
||||
`configuration file '${configurationFile.value}' MUST be an existing file`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue