mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 07:46:57 +00:00
[Ubuntu] Add archive.ubuntu.com to sources.list (#7616)
This commit is contained in:
12
images/linux/scripts/base/apt-ubuntu-archive.sh
Normal file
12
images/linux/scripts/base/apt-ubuntu-archive.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: apt-ubuntu-archive.sh
|
||||
## Desc: Script for adding additional apt repo to /etc/apt/sources.list
|
||||
################################################################################
|
||||
|
||||
echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted" | tee -a /etc/apt/sources.list
|
||||
echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-updates main restricted" | tee -a /etc/apt/sources.list
|
||||
|
||||
echo "deb http://security.ubuntu.com/ubuntu/ $(lsb_release -cs)-security main restricted" | tee -a /etc/apt/sources.list
|
||||
echo "deb http://security.ubuntu.com/ubuntu/ $(lsb_release -cs)-security universe" | tee -a /etc/apt/sources.list
|
||||
echo "deb http://security.ubuntu.com/ubuntu/ $(lsb_release -cs)-security multiverse" | tee -a /etc/apt/sources.list
|
||||
@@ -90,6 +90,14 @@
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "{{template_dir}}/scripts/base/apt-ubuntu-archive.sh",
|
||||
"environment_vars": [
|
||||
"DEBIAN_FRONTEND=noninteractive"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "{{template_dir}}/scripts/base/limits.sh",
|
||||
|
||||
@@ -198,6 +198,12 @@ build {
|
||||
scripts = ["${path.root}/scripts/base/repos.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["DEBIAN_FRONTEND=noninteractive"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/scripts/base/apt-ubuntu-archive.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["DEBIAN_FRONTEND=noninteractive"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
|
||||
Reference in New Issue
Block a user