Skip to content

Commit bbc102d

Browse files
committed
ci: support packaging for aarch64
GitHub Actions has supported native aarch64 runner, so that we can use our multi-arch docker image to build package for aarch64.
1 parent dfc83b1 commit bbc102d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/package.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ on:
2222
jobs:
2323

2424
build-and-publish-rpm:
25-
runs-on: ubuntu-latest
2625
strategy:
2726
matrix:
27+
arch: [ ubuntu-24.04, ubuntu-24.04-arm ]
2828
base_image: [ anolis8, rocky8, rocky9 ]
29+
runs-on: ${{ matrix.arch }}
2930
steps:
3031
- name: fetch source code
3132
uses: actions/checkout@v4
@@ -51,23 +52,28 @@ jobs:
5152
5253
- name: get package name
5354
run: |
54-
cd ./package/rpm/x86_64 && RPMNAME=`ls` && echo "rpmname=$RPMNAME" >> $GITHUB_ENV
55+
RPMPATH=./package/rpm/`uname -m` && \
56+
cd $RPMPATH && \
57+
RPMNAME=`ls` && \
58+
echo "rpmname=$RPMNAME" >> $GITHUB_ENV
59+
echo "rpmpath=$RPMPATH/$RPMNAME" >> $GITHUB_ENV
5560
- name: upload artifact
5661
if: startsWith(github.ref, 'refs/tags/')
5762
uses: actions/upload-artifact@v4
5863
with:
5964
name: ${{ env.rpmname }}
60-
path: ./package/rpm/x86_64/${{ env.rpmname }}
65+
path: ${{ env.rpmpath }}
6166
compression-level: 0
6267
- name: change ownership of the source code
6368
run: |
6469
sudo chown -R runner:runner `pwd`
6570
6671
build-and-publish-deb:
67-
runs-on: ubuntu-latest
6872
strategy:
6973
matrix:
74+
arch: [ ubuntu-24.04, ubuntu-24.04-arm ]
7075
base_image: [ ubuntu20.04, ubuntu22.04, ubuntu24.04, debian11, debian12 ]
76+
runs-on: ${{ matrix.arch }}
7177
steps:
7278
- name: fetch source code
7379
uses: actions/checkout@v4

0 commit comments

Comments
 (0)