Skip to content

Commit 0afb23b

Browse files
committed
add back ubuntu 22.04 and include distro in filenames
1 parent aa647dc commit 0afb23b

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

.github/workflows/build-deb.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14+
os:
15+
- ubuntu-22.04
16+
- ubuntu-24.04
1417
varnish:
1518
- varnish77
1619
- varnish80
17-
runs-on: ubuntu-24.04
20+
runs-on: ${{ matrix.os }}
1821
steps:
1922
- uses: actions/checkout@v4
2023

@@ -24,7 +27,7 @@ jobs:
2427
- name: Cache Rust dependencies
2528
uses: Swatinem/rust-cache@v2
2629
with:
27-
prefix-key: ${{ matrix.varnish }}
30+
prefix-key: ${{ matrix.os }}-${{ matrix.varnish }}
2831

2932
- name: Install Varnish from packagecloud
3033
run: |
@@ -35,11 +38,30 @@ jobs:
3538
- name: Install cargo-deb
3639
run: cargo install cargo-deb
3740

41+
- name: Set distro codename
42+
run: |
43+
if [ "${{ matrix.os }}" = "ubuntu-22.04" ]; then
44+
echo "DISTRO_CODENAME=jammy" >> $GITHUB_ENV
45+
elif [ "${{ matrix.os }}" = "ubuntu-24.04" ]; then
46+
echo "DISTRO_CODENAME=noble" >> $GITHUB_ENV
47+
else
48+
echo "Error: Unknown OS version ${{ matrix.os }}"
49+
exit 1
50+
fi
51+
3852
- name: Build Debian package
3953
run: cargo deb --variant=${{ matrix.varnish }}
4054

55+
- name: Rename package with distro codename
56+
run: |
57+
cd target/debian
58+
ORIG_FILE=$(ls vmod-lambda-${{ matrix.varnish }}_*.deb)
59+
NEW_FILE="${ORIG_FILE%.deb}_${DISTRO_CODENAME}.deb"
60+
mv "$ORIG_FILE" "$NEW_FILE"
61+
echo "DEB_FILE=$NEW_FILE" >> $GITHUB_ENV
62+
4163
- name: Upload artifact
4264
uses: actions/upload-artifact@v4
4365
with:
44-
name: vmod-lambda-${{ matrix.varnish }}.deb
45-
path: target/debian/*.deb
66+
name: vmod-lambda-${{ matrix.varnish }}-${DISTRO_CODENAME}.deb
67+
path: target/debian/${{ env.DEB_FILE }}

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
fail-fast: false
99
matrix:
1010
os:
11+
- ubuntu-22.04
1112
- ubuntu-24.04
1213
varnish:
1314
- varnish77
@@ -22,7 +23,7 @@ jobs:
2223
- name: Cache Rust dependencies
2324
uses: Swatinem/rust-cache@v2
2425
with:
25-
prefix-key: ${{ matrix.varnish }}
26+
prefix-key: ${{ matrix.os }}-${{ matrix.varnish }}
2627

2728
- name: Install Varnish from packagecloud
2829
run: |

0 commit comments

Comments
 (0)