Skip to content

Commit 2c14f89

Browse files
committed
Updates to distro packaging workflows
* revamp MAJOR and MINOR version extraction to support 2 digit major versions for RHEL * disable packaging for bullseye, enable for trixie * enable packaging for RHEL 10
1 parent 1bbb090 commit 2c14f89

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

.github/workflows/pkg-build.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ jobs:
1717
- amd64
1818
target:
1919
- "debian:bookworm"
20-
- "debian:bullseye"
20+
- "debian:trixie"
2121
- "ubuntu:noble"
22-
- "ubuntu:focal"
2322
- "ubuntu:jammy"
2423

2524
steps:
@@ -52,8 +51,7 @@ jobs:
5251
arch:
5352
- amd64
5453
target:
55-
- "debian:bullseye"
56-
- "ubuntu:focal"
54+
- "debian:trixie"
5755
- "ubuntu:jammy"
5856
- "ubuntu:noble"
5957
- "debian:bookworm"
@@ -93,9 +91,8 @@ jobs:
9391
arch:
9492
- amd64
9593
target:
96-
- "debian:bullseye"
94+
- "debian:trixie"
9795
- "debian:bookworm"
98-
- "ubuntu:focal"
9996
- "ubuntu:jammy"
10097
- "ubuntu:noble"
10198
needs: test

.github/workflows/rpm-build.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ jobs:
2121
- almalinux:9.4
2222
- almalinux:9.5
2323
- almalinux:9.6
24+
- almalinux:10.0
2425

2526
steps:
2627
- name: Extract RHEL release
2728
run: |
28-
MINOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:[89]\.)\d+')
29-
MAJOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:)[89]')
29+
IMAGE="${{ matrix.target }}"
30+
VERSION="${IMAGE#*:}"
31+
MAJOR="${VERSION%%.*}"
32+
MINOR="${VERSION#*.}"
3033
echo "RHEL_RELEASE=.el${MAJOR}_${MINOR}" >> $GITHUB_ENV
3134
- name: Checkout repo
3235
uses: actions/checkout@v4
@@ -62,13 +65,16 @@ jobs:
6265
- almalinux:9.4
6366
- almalinux:9.5
6467
- almalinux:9.6
68+
- almalinux:10.0
6569
needs: build
6670
steps:
6771
- name: Set environment variables for download
6872
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
6973
- name: Extract RHEL release
7074
run: |
71-
MAJOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:)[89]')
75+
IMAGE="${{ matrix.target }}"
76+
VERSION="${IMAGE#*:}"
77+
MAJOR="${VERSION%%.*}"
7278
echo "MAJOR=${MAJOR}" >> $GITHUB_ENV
7379
- name: Download artifact
7480
uses: actions/download-artifact@v4
@@ -86,6 +92,9 @@ jobs:
8692
elif [[ "${MAJOR}" == "9" ]]; then
8793
dnf config-manager --enable crb || true
8894
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm || true
95+
elif [[ "${MAJOR}" == "10" ]]; then
96+
dnf config-manager --enable crb || true
97+
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm || true
8998
fi
9099
- name: Test package install
91100
run: |
@@ -114,12 +123,15 @@ jobs:
114123
- almalinux:9.4
115124
- almalinux:9.5
116125
- almalinux:9.6
126+
- almalinux:10.0
117127
needs: test
118128
steps:
119129
- name: Set RHEL version number
120130
run: |
121-
MINOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:[89]\.)\d+')
122-
MAJOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:)[89]')
131+
IMAGE="${{ matrix.target }}"
132+
VERSION="${IMAGE#*:}"
133+
MAJOR="${VERSION%%.*}"
134+
MINOR="${VERSION#*.}"
123135
echo "MAJOR={MAJOR}" >> $GITHUB_ENV
124136
- name: Set environment variables for download
125137
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV

0 commit comments

Comments
 (0)