Skip to content

Commit 65e2528

Browse files
authored
ci: optimize build rpm workflow with apisix-build-tools v2.2.0 (#2133)
1 parent b5af46c commit 65e2528

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/auto-build-rpm.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ jobs:
2929
- name: Check out code
3030
uses: actions/checkout@v2
3131

32+
- uses: docker/setup-buildx-action@v1
33+
34+
- uses: actions/cache@v2
35+
with:
36+
path: /tmp/.buildx-cache
37+
key: ${{ runner.os }}-buildx-apisixdashboard-${{ github.sha }}
38+
restore-keys: |
39+
${{ runner.os }}-buildx-apisixdashboard-
40+
${{ runner.os }}-buildx-
41+
3242
- name: Extract branch name
3343
id: branch_env
3444
shell: bash
@@ -39,7 +49,7 @@ jobs:
3949
run: |
4050
export VERSION=${{ steps.branch_env.outputs.version }}
4151
sudo gem install --no-document fpm
42-
git clone -b v2.1.0 https://github.com/api7/apisix-build-tools.git
52+
git clone -b v2.2.0 https://github.com/api7/apisix-build-tools.git
4353
4454
# move codes under build tool
4555
mkdir ./apisix-build-tools/apisix-dashboard
@@ -50,7 +60,7 @@ jobs:
5060
if [ "$VERSION" != "merge" && "$VERSION" != "master" ];then
5161
export checkout=release/${VERSION}
5262
fi
53-
make package type=rpm app=dashboard version=${VERSION} checkout=${checkout} image_base=centos image_tag=7 local_code_path=./apisix-dashboard
63+
make package type=rpm app=dashboard version=${VERSION} checkout=${checkout} image_base=centos image_tag=7 local_code_path=./apisix-dashboard buildx=True
5464
5565
- name: Run centos7 docker and mapping apisix into container
5666
run: |

0 commit comments

Comments
 (0)