mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-17 09:22:36 +00:00
chore: use docker user
This commit is contained in:
parent
de14f4f817
commit
bac795faac
2 changed files with 3 additions and 5 deletions
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
|
@ -14,9 +14,6 @@ jobs:
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: whoami
|
|
||||||
- run: cat /etc/group
|
|
||||||
- run: cat /etc/passwd
|
|
||||||
- name: github-cleanup
|
- name: github-cleanup
|
||||||
uses: renovatebot/internal-tools@v0
|
uses: renovatebot/internal-tools@v0
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,16 @@ class Renovate {
|
||||||
}
|
}
|
||||||
|
|
||||||
async runDockerContainer(): Promise<void> {
|
async runDockerContainer(): Promise<void> {
|
||||||
await exec('whoami');
|
|
||||||
await exec('sudo', ['usermod', '-aG', 'docker', 'runneradmin']);
|
|
||||||
const commandArguments = [
|
const commandArguments = [
|
||||||
'--rm',
|
'--rm',
|
||||||
`--env ${this.configFileEnv}=${this.configFileMountPath()}`,
|
`--env ${this.configFileEnv}=${this.configFileMountPath()}`,
|
||||||
`--env ${this.tokenEnv}=${this.token}`,
|
`--env ${this.tokenEnv}=${this.token}`,
|
||||||
|
`-e RENOVATE_DOCKER_USER=1001`,
|
||||||
|
`-e HOME=/home/ubuntu`,
|
||||||
`--volume ${this.configFile}:${this.configFileMountPath()}`,
|
`--volume ${this.configFile}:${this.configFileMountPath()}`,
|
||||||
`-v /var/run/docker.sock:/var/run/docker.sock`,
|
`-v /var/run/docker.sock:/var/run/docker.sock`,
|
||||||
`-v /tmp:/tmp`,
|
`-v /tmp:/tmp`,
|
||||||
|
`-u 1001`,
|
||||||
this.docker.image(),
|
this.docker.image(),
|
||||||
];
|
];
|
||||||
const command = `docker run ${commandArguments.join(' ')}`;
|
const command = `docker run ${commandArguments.join(' ')}`;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue