mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
[ubuntu] Update apt sources (#8075)
This commit is contained in:
committed by
GitHub
parent
d2c69950ce
commit
7fa63e2b95
@@ -1,12 +1,15 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
################################################################################
|
################################################################################
|
||||||
## File: apt-ubuntu-archive.sh
|
## File: apt-ubuntu-archive.sh
|
||||||
## Desc: Script for adding additional apt repo to /etc/apt/sources.list and /etc/cloud/templates/sources.list.ubuntu.tmpl
|
## Desc: Script for configuring apt sources. https://manpages.ubuntu.com/manpages/jammy/en/man1/apt-transport-mirror.1.html
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted" | tee -a /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl
|
touch /etc/apt/apt-mirrors.txt
|
||||||
echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-updates main restricted" | tee -a /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl
|
|
||||||
|
|
||||||
echo "deb http://security.ubuntu.com/ubuntu/ $(lsb_release -cs)-security main restricted" | tee -a /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl
|
printf "http://azure.archive.ubuntu.com/ubuntu/\tpriority:1\n" | tee -a /etc/apt/apt-mirrors.txt
|
||||||
echo "deb http://security.ubuntu.com/ubuntu/ $(lsb_release -cs)-security universe" | tee -a /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl
|
printf "http://archive.ubuntu.com/ubuntu/\tpriority:2\n" | tee -a /etc/apt/apt-mirrors.txt
|
||||||
echo "deb http://security.ubuntu.com/ubuntu/ $(lsb_release -cs)-security multiverse" | tee -a /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl
|
printf "http://security.ubuntu.com/ubuntu/\tpriority:3\n" | tee -a /etc/apt/apt-mirrors.txt
|
||||||
|
|
||||||
|
sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/apt-mirrors.txt/' /etc/apt/sources.list
|
||||||
|
|
||||||
|
cp -f /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"script": "{{template_dir}}/scripts/base/apt.sh",
|
"script": "{{template_dir}}/scripts/base/apt-ubuntu-archive.sh",
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"DEBIAN_FRONTEND=noninteractive"
|
"DEBIAN_FRONTEND=noninteractive"
|
||||||
],
|
],
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"script": "{{template_dir}}/scripts/base/apt-ubuntu-archive.sh",
|
"script": "{{template_dir}}/scripts/base/apt.sh",
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"DEBIAN_FRONTEND=noninteractive"
|
"DEBIAN_FRONTEND=noninteractive"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user