mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-18 01:42:34 +00:00
feat: use node executor
This commit is contained in:
parent
7b883f8510
commit
f89b01aa7e
4 changed files with 34 additions and 6 deletions
9
.github/renovate.json
vendored
9
.github/renovate.json
vendored
|
|
@ -33,5 +33,14 @@
|
|||
"automerge": true,
|
||||
"automergeType": "branch"
|
||||
}
|
||||
],
|
||||
"regexManagers": [
|
||||
{
|
||||
"fileMatch": ["\\.sh$"],
|
||||
"matchStrings": [
|
||||
"# renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s[A-Z_]+?_VERSION=(?<currentValue>.+?)\\s"
|
||||
],
|
||||
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
14
action.yml
14
action.yml
|
|
@ -14,9 +14,13 @@ inputs:
|
|||
GitHub personal access token that Renovate should use. This should be
|
||||
configured using a Secret.
|
||||
required: true
|
||||
#runs:
|
||||
# using: docker
|
||||
# image: src/Dockerfile
|
||||
# args:
|
||||
# - ${{ inputs.configurationFile }}
|
||||
# - ${{ inputs.token }}
|
||||
|
||||
runs:
|
||||
using: docker
|
||||
image: src/Dockerfile
|
||||
args:
|
||||
- ${{ inputs.configurationFile }}
|
||||
- ${{ inputs.token }}
|
||||
using: 'node12'
|
||||
main: 'src/index.js'
|
||||
|
|
|
|||
|
|
@ -17,4 +17,11 @@ fi
|
|||
# Mimic the original ENTRYPOINT of the renovate/renovate Docker container. See
|
||||
# the following link for this entry.
|
||||
# https://github.com/renovatebot/renovate/blob/19.175.3/Dockerfile#L220
|
||||
RENOVATE_TOKEN="${TOKEN}" node /usr/src/app/dist/renovate.js
|
||||
#RENOVATE_TOKEN="${TOKEN}" node /usr/src/app/dist/renovate.js
|
||||
|
||||
config=$(basename RENOVATE_CONFIG_FILE)
|
||||
|
||||
# renovate: datasource=docker depName=renovate/renovate versioning=docker
|
||||
ARG RENOVATE_VERSION=19.219.11-slim
|
||||
|
||||
docker run --rm -e RENOVATE_TOKEN="${TOKEN}" -e RENOVATE_CONFIG_FILE=/$config -v /tmp:/tmp -v $RENOVATE_CONFIG_FILE:/$config renovate/renovate
|
||||
|
|
|
|||
8
src/index.js
Normal file
8
src/index.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const cfg = process.env[`INPUT_CONFIGURATIONFILE`];
|
||||
const token = process.env[`INPUT_TOKEN`];
|
||||
const ws = process.env.GITHUB_WORKSPACE;
|
||||
|
||||
execSync(`bash -c ${ws}/src/entrypoint.sh '${cfg}' '${token}'`);
|
||||
Loading…
Add table
Add a link
Reference in a new issue