Skip to content

Commit 74fd05b

Browse files
shouhuanxiaojiriosje
authored andcommitted
Added CI support for TencentOS 4 and OpenCloudOS 9
1 parent 11e8ea5 commit 74fd05b

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
strategy:
107107
matrix:
108108
version: [ 20, 22, 24, 25, 26 ]
109-
os: [ "fedora:41", "amazonlinux:2023", "rockylinux:9", "rockylinux:8", "redhat/ubi9:latest" ]
109+
os: [ "fedora:41", "amazonlinux:2023", "rockylinux:9", "rockylinux:8", "redhat/ubi9:latest", "tencentos/tencentos4:latest" ]
110110
container:
111111
image: ${{ matrix.os }}
112112
defaults:
@@ -198,7 +198,7 @@ jobs:
198198
strategy:
199199
matrix:
200200
version: [ 20, 22, 24, 25, 26 ]
201-
os: [ "rockylinux:9-minimal", "rockylinux:8-minimal", "redhat/ubi9-minimal:latest" ]
201+
os: [ "rockylinux:9-minimal", "rockylinux:8-minimal", "redhat/ubi9-minimal:latest", "tencentos/tencentos4-minimal:latest", "opencloudos/opencloudos9-minimal:latest" ]
202202
container:
203203
image: ${{ matrix.os }}
204204
defaults:
@@ -207,8 +207,16 @@ jobs:
207207
steps:
208208
- name: install git
209209
run: |
210-
microdnf update -y
211-
microdnf install git -y
210+
if command -v microdnf &>/dev/null; then
211+
PM=microdnf
212+
elif command -v dnf &>/dev/null; then
213+
PM=dnf
214+
else
215+
PM=yum
216+
fi
217+
echo "PM=$PM" >> $GITHUB_ENV
218+
$PM update -y
219+
$PM install git -y
212220
213221
- name: Checkout Repo
214222
uses: actions/checkout@v5
@@ -217,11 +225,11 @@ jobs:
217225
run: ./scripts/rpm/setup_${{ matrix.version }}.x
218226

219227
- name: Audit Repository
220-
run: microdnf repolist
228+
run: ${{ env.PM }} repolist
221229

222230
- name: Install Nodejs
223231
run: |
224-
microdnf install nodejs -y
232+
${{ env.PM }} install nodejs -y
225233
226234
- name: Validate Node Version
227235
run: |

scripts/rpm/setup_26.x

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ command_exists() {
3232
}
3333

3434
# Check if we are on an RPM-based system
35-
if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
35+
if ! [ -f /etc/redhat-release ] \
36+
&& ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \
37+
&& ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \
38+
&& ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then
3639
handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system."
3740
fi
3841

0 commit comments

Comments
 (0)