Skip to content

Commit eec0997

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

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

.github/workflows/build-deb.yml

Lines changed: 20 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,24 @@ jobs:
3538
- name: Install cargo-deb
3639
run: cargo install cargo-deb
3740

41+
- name: Set distro codename
42+
run: |
43+
DISTRO_CODENAME=$(lsb_release -sc)
44+
echo "DISTRO_CODENAME=$DISTRO_CODENAME" >> $GITHUB_ENV
45+
3846
- name: Build Debian package
3947
run: cargo deb --variant=${{ matrix.varnish }}
4048

49+
- name: Rename package with distro codename
50+
run: |
51+
cd target/debian
52+
ORIG_FILE=$(ls vmod-lambda-${{ matrix.varnish }}_*.deb)
53+
NEW_FILE="${ORIG_FILE%.deb}_${DISTRO_CODENAME}.deb"
54+
mv "$ORIG_FILE" "$NEW_FILE"
55+
echo "DEB_FILE=$NEW_FILE" >> $GITHUB_ENV
56+
4157
- name: Upload artifact
4258
uses: actions/upload-artifact@v4
4359
with:
44-
name: vmod-lambda-${{ matrix.varnish }}.deb
45-
path: target/debian/*.deb
60+
name: vmod-lambda-${{ matrix.varnish }}-${{ env.DISTRO_CODENAME }}.deb
61+
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)