Update main.js

This commit is contained in:
Dawid Dziurla 2022-06-17 16:21:54 +02:00 committed by GitHub
parent 8b55cf07d1
commit 30df452da3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,12 +77,13 @@ async function main() {
core.endGroup()
}
if (distribution.endsWith('-backports') {
if (imageName == "debian" && distribution.endsWith("-backports")) {
core.startGroup("Enable backports")
const baseDistribution = distribution.replace("-backports", "")
await exec.exec("docker", [
"exec",
container,
"bash", "-c", "echo 'APT::Get::Assume-Yes \"true\";' > /etc/apt/apt.conf.d/00noconfirm"
"bash", "-c", `grep -m1 -E '^deb .+ ${baseDistribution} .+$' /etc/apt/sources.list | sed 's/ ${baseDistribution} / ${distribution} /' | tee /etc/apt/sources.list.d/backports.list`
])
core.endGroup()
}