mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-16 17:02:36 +00:00
feat: add token input and account for Renovate WORKDIR
This commit is contained in:
parent
341841ebc6
commit
cd4dee3297
3 changed files with 23 additions and 7 deletions
|
|
@ -3,6 +3,8 @@
|
|||
# Entrypoint for Docker.
|
||||
|
||||
readonly CONFIGURATION_FILE="${1}"
|
||||
readonly TOKEN="${2}"
|
||||
|
||||
readonly CONFIGURATION_PATH="${GITHUB_WORKSPACE}/${CONFIGURATION_FILE}"
|
||||
|
||||
if [[ ! -f "${CONFIGURATION_PATH}" ]]; then
|
||||
|
|
@ -10,12 +12,17 @@ if [[ ! -f "${CONFIGURATION_PATH}" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
cp "${CONFIGURATION_PATH}" '/usr/src/app/config.js'
|
||||
readonly WORKDIR='/usr/src/app'
|
||||
# Account for the WORKDIR entry of the renovate/renovate Docker container. See
|
||||
# the followling link for this entry.
|
||||
# https://github.com/renovatebot/renovate/blob/19.175.3/Dockerfile#L14
|
||||
cd "${WORKDIR}" || { echo "ERROR: Couldn't cd to ${WORKDIR}" 1>&2; exit 1; }
|
||||
|
||||
cp "${CONFIGURATION_PATH}" './config.js'
|
||||
|
||||
# Run Renovate.
|
||||
#
|
||||
# This mimics the original entrypoint of the renovate/renovate Docker container.
|
||||
# See the following link for this entrypoint in the renovate/renovate Docker
|
||||
# container.
|
||||
# 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
|
||||
node /usr/src/app/dist/renovate.js
|
||||
RENOVATE_TOKEN="${TOKEN}" node /usr/src/app/dist/renovate.js
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue