-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: rename docker-cmd-file to docker-entrypoint-file #866
base: main
Are you sure you want to change the base?
Changes from all commits
162a454
b67a7b4
2b7c661
bfd30eb
38513fe
e5a2162
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ GitHub Action to run Renovate self-hosted. | |
- [Badges](#badges) | ||
- [Options](#options) | ||
- [`configurationFile`](#configurationfile) | ||
- [`docker-cmd-file`](#docker-cmd-file) | ||
- [`docker-entrypoint-file`](#docker-entrypoint-file) | ||
- [`docker-network`](#docker-network) | ||
- [`docker-socket-host-path`](#docker-socket-host-path) | ||
- [`docker-user`](#docker-user) | ||
|
@@ -67,11 +67,10 @@ This disables the requirement of a configuration file for the repository and dis | |
requireConfig: false, | ||
``` | ||
|
||
### `docker-cmd-file` | ||
### `docker-entrypoint-file` | ||
|
||
Specify a command to run when the image start. | ||
By default the image run | ||
`renovate`. | ||
Specify an entrypoint file to run when the image starts. | ||
The default is [renovate-entrypoint.sh](https://github.com/renovatebot/renovate/blob/main/tools/docker/bin/renovate-entrypoint.sh) located in `/usr/local/sbin/renovate-entrypoint.sh` | ||
This option is useful to customize the image before running `renovate`. | ||
It must be an existing executable file on the local system. | ||
It will be mounted to the docker container. | ||
|
@@ -102,7 +101,7 @@ jobs: | |
- name: Self-hosted Renovate | ||
uses: renovatebot/[email protected] | ||
with: | ||
docker-cmd-file: .github/renovate-entrypoint.sh | ||
docker-entrypoint-file: .github/renovate-entrypoint.sh | ||
docker-user: root | ||
token: ${{ secrets.RENOVATE_TOKEN }} | ||
``` | ||
|
@@ -124,7 +123,7 @@ Only applicable when `mount-docker-socket` is true. | |
|
||
Specify a user (or user-id) to run docker command. | ||
|
||
You can use it with [`docker-cmd-file`](#docker-cmd-file) in order to start the | ||
You can use it with [`docker-entrypoint-file`](#docker-entrypoint-file) in order to start the | ||
image as root, do some customization and switch back to a unprivileged user. | ||
|
||
### `docker-volumes` | ||
|
@@ -183,6 +182,7 @@ If you want to use the `github-actions` manager, you must setup a [special token | |
The Renovate Docker image name to use. | ||
If omitted or `renovate-image === ''` the action will use the `ghcr.io/renovatebot/renovate` Docker image name otherwise. | ||
If a Docker image name is defined, the action will use that name to pull the image. | ||
Note: Use only the image name without a tag, [`renovate-version`](#renovate-version) is used as the image tag. | ||
|
||
This sample will use `myproxyhub.domain.com/renovate/renovate` image. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,15 +19,15 @@ inputs: | |
env-regex: | ||
description: | | ||
Override the environment variables which will be passsed into the renovate container. | ||
Defaults to `^(?:RENOVATE_\\w+|LOG_LEVEL|GITHUB_COM_TOKEN|NODE_OPTIONS|(?:HTTPS?|NO)_PROXY|(?:https?|no)_proxy)$` | ||
Defaults to `^(?:RENOVATE_\w+|LOG_LEVEL|GITHUB_COM_TOKEN|NODE_OPTIONS|(?:HTTPS?|NO)_PROXY|(?:https?|no)_proxy)$` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't change unrelated things |
||
required: false | ||
renovate-version: | ||
description: | | ||
Renovate version to use. Defaults to latest. | ||
Renovate version to use. Also used as image tag together with the parameter `renovate-image`. Defaults to latest. | ||
required: false | ||
renovate-image: | ||
description: | | ||
Renovate docker image name. | ||
Renovate docker image name. Use the parameter `renovate-version` to set the image tag. | ||
Defaults to `ghcr.io/renovatebot/renovate`. | ||
required: false | ||
mount-docker-socket: | ||
|
@@ -43,9 +43,13 @@ inputs: | |
Only applicable when 'mount-docker-socket' is true. | ||
required: false | ||
default: /var/run/docker.sock | ||
docker-entrypoint-file: | ||
description: | | ||
Override docker docker entrypoint. Use with `docker-user: root`. See the example for usage. | ||
required: false | ||
docker-cmd-file: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add |
||
description: | | ||
Override docker command. Default command is `renovate` | ||
Deprecated, keeping it around for the backward compatibility. Use `docker-entrypoint-file` instead. | ||
required: false | ||
docker-network: | ||
description: | | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -77,9 +77,16 @@ class Input { | |||||||||||||
return core.getInput('docker-socket-host-path') || '/var/run/docker.sock'; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
getDockerCmdFile(): string | null { | ||||||||||||||
const cmdFile = core.getInput('docker-cmd-file'); | ||||||||||||||
return !!cmdFile && cmdFile !== '' ? path.resolve(cmdFile) : null; | ||||||||||||||
getDockerEntrypointFile(): string | null { | ||||||||||||||
const cmdFile = core.getInput('docker-entrypoint-file'); | ||||||||||||||
const entryPointFile = | ||||||||||||||
!!cmdFile && cmdFile !== '' | ||||||||||||||
? cmdFile | ||||||||||||||
: core.getInput('docker-entrypoint-file'); | ||||||||||||||
Comment on lines
+81
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use a single variable |
||||||||||||||
|
||||||||||||||
return !!entryPointFile && entryPointFile !== '' | ||||||||||||||
? path.resolve(entryPointFile) | ||||||||||||||
: null; | ||||||||||||||
Comment on lines
+87
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
simplify |
||||||||||||||
} | ||||||||||||||
|
||||||||||||||
getDockerUser(): string | null { | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated, please open a separate PR