feat: use node executor

This commit is contained in:
Michael Kriese 2020-04-28 18:42:35 +02:00
parent 7b883f8510
commit f89b01aa7e
4 changed files with 34 additions and 6 deletions

View file

@ -33,5 +33,14 @@
"automerge": true, "automerge": true,
"automergeType": "branch" "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}}"
}
] ]
} }

View file

@ -14,9 +14,13 @@ inputs:
GitHub personal access token that Renovate should use. This should be GitHub personal access token that Renovate should use. This should be
configured using a Secret. configured using a Secret.
required: true required: true
#runs:
# using: docker
# image: src/Dockerfile
# args:
# - ${{ inputs.configurationFile }}
# - ${{ inputs.token }}
runs: runs:
using: docker using: 'node12'
image: src/Dockerfile main: 'src/index.js'
args:
- ${{ inputs.configurationFile }}
- ${{ inputs.token }}

View file

@ -17,4 +17,11 @@ fi
# Mimic the original ENTRYPOINT of the renovate/renovate Docker container. See # Mimic the original ENTRYPOINT of the renovate/renovate Docker container. See
# the following link for this entry. # the following link for this entry.
# https://github.com/renovatebot/renovate/blob/19.175.3/Dockerfile#L220 # 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
View 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}'`);