main: support additional repositories
This commit is contained in:
parent
bdaada836f
commit
6dbd083ca8
19
main.js
19
main.js
|
@ -24,6 +24,7 @@ async function main() {
|
||||||
try {
|
try {
|
||||||
const sourceRelativeDirectory = core.getInput("source_directory") || "./"
|
const sourceRelativeDirectory = core.getInput("source_directory") || "./"
|
||||||
const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./"
|
const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./"
|
||||||
|
const additionalRepositories = core.getInput("additional_repositories")
|
||||||
|
|
||||||
const workspaceDirectory = process.cwd()
|
const workspaceDirectory = process.cwd()
|
||||||
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
|
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
|
||||||
|
@ -97,6 +98,24 @@ async function main() {
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (additionalRepositories) {
|
||||||
|
core.startGroup("Add repositories")
|
||||||
|
for (const repo of additionalRepositories.split("\n")) {
|
||||||
|
if (repo.startsWith("deb ")) {
|
||||||
|
repo.replace(searchValue, replaceValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
await exec.exec("docker", [
|
||||||
|
"exec",
|
||||||
|
container,
|
||||||
|
"sh",
|
||||||
|
"-c",
|
||||||
|
`echo ${repo} > /etc/apt/sources.list`
|
||||||
|
])
|
||||||
|
}
|
||||||
|
core.endGroup()
|
||||||
|
}
|
||||||
|
|
||||||
core.startGroup("Update packages list")
|
core.startGroup("Update packages list")
|
||||||
await exec.exec("docker", [
|
await exec.exec("docker", [
|
||||||
"exec",
|
"exec",
|
||||||
|
|
Loading…
Reference in a new issue