mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 22:26:56 +00:00
add reboot for Ubuntu20
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get -yq update
|
||||
apt-get -yq dist-upgrade
|
||||
|
||||
# Stop and disable apt-daily upgrade services;
|
||||
systemctl stop apt-daily.timer
|
||||
systemctl disable apt-daily.timer
|
||||
@@ -16,7 +12,7 @@ systemctl disable apt-daily-upgrade.service
|
||||
sudo sed -i 's/APT::Periodic::Update-Package-Lists "1"/APT::Periodic::Update-Package-Lists "0"/' /etc/apt/apt.conf.d/20auto-upgrades
|
||||
|
||||
# Enable retry logic for apt up to 10 times
|
||||
echo "APT::Acquire::Retries \"10\";" > /etc/apt/apt.conf.d/80-retries
|
||||
echo "APT::Acquire::Retries \"10\";" > /etc/apt/apt.conf.d/80-retries
|
||||
|
||||
# Configure apt to always assume Y
|
||||
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
|
||||
|
||||
@@ -16,4 +16,7 @@ curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
|
||||
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
||||
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
|
||||
apt-get update
|
||||
|
||||
# update
|
||||
apt-get -yq update
|
||||
apt-get -yq dist-upgrade
|
||||
|
||||
Reference in New Issue
Block a user