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