This commit is contained in:
parent
ff466c7efa
commit
115111f484
@ -11,39 +11,39 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: dockerp.com/openjdk:17-jdk-slim # 使用带有 JDK 17 的 Docker 镜像
|
||||
# container:
|
||||
# image: dockerp.com/openjdk:17-jdk-slim # 使用带有 JDK 17 的 Docker 镜像
|
||||
|
||||
steps:
|
||||
- name: Check Version Docker
|
||||
- name: Check Version #Docker
|
||||
run: |
|
||||
cat /proc/version
|
||||
|
||||
- name: Install curl
|
||||
run: |
|
||||
#apt update
|
||||
apt install -y curl
|
||||
# - name: Install curl
|
||||
# run: |
|
||||
# apt-get update
|
||||
# apt-get install -y curl
|
||||
|
||||
- name: Change Download URL to NJU Mirror
|
||||
run: |
|
||||
# 替换为 NJU 的 APT 源
|
||||
echo "deb https://mirror.nju.edu.cn/ubuntu/ focal main restricted universe multiverse" > /etc/apt/sources.list
|
||||
echo "deb https://mirror.nju.edu.cn/ubuntu/ focal-updates main restricted universe multiverse" >> /etc/apt/sources.list
|
||||
echo "deb https://mirror.nju.edu.cn/ubuntu/ focal-backports main restricted universe multiverse" >> /etc/apt/sources.list
|
||||
echo "deb https://mirror.nju.edu.cn/ubuntu/ focal-security main restricted universe multiverse" >> /etc/apt/sources.list
|
||||
echo "deb https://mirror.nju.edu.cn/ubuntu/ noble main restricted universe multiverse" > /etc/apt/sources.list.d/ubuntu.sources
|
||||
echo "deb https://mirror.nju.edu.cn/ubuntu/ noble-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/ubuntu.sources
|
||||
echo "deb https://mirror.nju.edu.cn/ubuntu/ noble-backports main restricted universe multiverse" >> /etc/apt/sources.list.d/ubuntu.sources
|
||||
echo "deb https://mirror.nju.edu.cn/ubuntu/ noble-security main restricted universe multiverse" >> /etc/apt/sources.list.d/ubuntu.sources
|
||||
|
||||
- name: Add missing GPG keys for NJU mirror
|
||||
run: |
|
||||
# 添加公钥 3B4FE6ACC0B21F32
|
||||
curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3B4FE6ACC0B21F32 | tee /etc/apt/trusted.gpg.d/nju-archive-key.asc
|
||||
|
||||
# 添加公钥 871920D1991BC93C
|
||||
curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C | tee /etc/apt/trusted.gpg.d/nju-archive-key.asc
|
||||
|
||||
- name: Install gnupg
|
||||
run: |
|
||||
apt-get update --allow-unauthenticated --ignore-missing
|
||||
apt-get install --allow-unauthenticated -y gnupg
|
||||
# - name: Add missing GPG keys for NJU mirror
|
||||
# run: |
|
||||
# # 添加公钥 3B4FE6ACC0B21F32
|
||||
# curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3B4FE6ACC0B21F32 | tee /etc/apt/trusted.gpg.d/nju-archive-key.asc
|
||||
#
|
||||
# # 添加公钥 871920D1991BC93C
|
||||
# curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C | tee /etc/apt/trusted.gpg.d/nju-archive-key.asc
|
||||
#
|
||||
# - name: Install gnupg
|
||||
# run: |
|
||||
# apt-get update --allow-unauthenticated --ignore-missing
|
||||
# apt-get install --allow-unauthenticated -y gnupg
|
||||
|
||||
- name: Add missing GPG keys for NJU mirror
|
||||
run: |
|
||||
@ -53,10 +53,10 @@ jobs:
|
||||
# 导入公钥 871920D1991BC93C
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
|
||||
|
||||
- name: Disable APT signature verification
|
||||
run: |
|
||||
echo "Acquire::https::mirror.nju.edu.cn::Verify-Peer false;" | tee /etc/apt/apt.conf.d/99disable-verify
|
||||
echo "Acquire::https::mirror.nju.edu.cn::Verify-Host false;" | tee -a /etc/apt/apt.conf.d/99disable-verify
|
||||
# - name: Disable APT signature verification
|
||||
# run: |
|
||||
# echo "Acquire::https::mirror.nju.edu.cn::Verify-Peer false;" | tee /etc/apt/apt.conf.d/99disable-verify
|
||||
# echo "Acquire::https::mirror.nju.edu.cn::Verify-Host false;" | tee -a /etc/apt/apt.conf.d/99disable-verify
|
||||
|
||||
- name: Apt Update
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user