mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(improvement)(build) Fixed the issue of unable to download JDK on CentOS. (#1118)
This commit is contained in:
15
.github/workflows/centos-ci.yml
vendored
15
.github/workflows/centos-ci.yml
vendored
@@ -16,9 +16,20 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Java and Maven
|
||||
- name: Reset DNF repositories
|
||||
run: |
|
||||
cd /etc/yum.repos.d/
|
||||
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
|
||||
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
|
||||
- name: Update DNF package index
|
||||
run: dnf makecache
|
||||
- name: Install Java and Maven with retry
|
||||
run: |
|
||||
for i in {1..5}; do
|
||||
dnf install -y java-1.8.0-openjdk-devel maven && break || sleep 15
|
||||
done
|
||||
- name: Verify Java and Maven installation
|
||||
run: |
|
||||
dnf install -y java-1.8.0-openjdk-devel maven
|
||||
java -version
|
||||
mvn -version
|
||||
- name: Cache Maven packages
|
||||
|
||||
Reference in New Issue
Block a user