mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-16 17:02:36 +00:00
feat: simplify entrypoint (#27)
This commit is contained in:
parent
24e5bc5966
commit
1e1bc634ac
1 changed files with 3 additions and 11 deletions
|
|
@ -5,21 +5,13 @@
|
|||
readonly CONFIGURATION_FILE="${1}"
|
||||
readonly TOKEN="${2}"
|
||||
|
||||
readonly CONFIGURATION_PATH="${GITHUB_WORKSPACE}/${CONFIGURATION_FILE}"
|
||||
export RENOVATE_CONFIG_FILE="${GITHUB_WORKSPACE}/${CONFIGURATION_FILE}"
|
||||
|
||||
if [[ ! -f "${CONFIGURATION_PATH}" ]]; then
|
||||
echo "ERROR: Couldn't find file ${CONFIGURATION_PATH}" 1>&2
|
||||
if [[ ! -f "${RENOVATE_CONFIG_FILE}" ]]; then
|
||||
echo "ERROR: Couldn't find file ${RENOVATE_CONFIG_FILE}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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.
|
||||
#
|
||||
# Mimic the original ENTRYPOINT of the renovate/renovate Docker container. See
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue