File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : package apisix-openresty
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ env :
13+ BUILD_APISIX_OR_VERSION : 1.0.0
14+ steps :
15+ - uses : actions/checkout@v2
16+
17+ - name : install dependencies
18+ run : |
19+ sudo apt-get install -y make ruby ruby-dev rubygems build-essential
20+ sudo gem install --no-document fpm
21+ sudo apt-get install -y rpm
22+
23+ - name : build apisix-openresty rpm
24+ run : |
25+ make package type=rpm app=apisix-openresty version=${BUILD_APISIX_OR_VERSION}
26+
27+ - name : run centos7 docker and mapping apisix-openresty rpm into container
28+ run : |
29+ docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
30+
31+ - name : install dependencies in container
32+ run : |
33+ docker exec centos7Instance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo"
34+ docker exec centos7Instance bash -c "yum -y install openresty-openssl111 openresty-pcre openresty-zlib"
35+
36+ - name : install rpm in container
37+ run : |
38+ docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-openresty-${BUILD_APISIX_OR_VERSION}-0.x86_64.rpm"
39+
40+ - name : check and ensure openresty is installed
41+ run : |
42+ export APISIX_OPENRESTY_VER=$(docker exec centos7Instance bash -c "openresty -V" 2>&1 | awk '/-O2 -DAPISIX_OPENRESTY_VER=/{print $5}' | awk -v FS="=" '{print $2}')
43+ if [ "$APISIX_OPENRESTY_VER" != "${BUILD_APISIX_OR_VERSION}" ]; then exit 1; fi
44+
You can’t perform that action at this time.
0 commit comments