-
Notifications
You must be signed in to change notification settings - Fork 98
53 lines (44 loc) · 1.97 KB
/
package-apisix-base-rpm-el7.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: package apisix-base rpm for el7
on:
push:
branches: [ master ]
tags:
- "v*"
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_APISIX_BASE_VERSION: 1.19.3.2.0
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt-get install -y make ruby ruby-dev rubygems build-essential
- name: build apisix-base rpm
run: |
make package type=rpm app=apisix-base version=${BUILD_APISIX_BASE_VERSION} image_base=centos image_tag=7
- name: run centos7 docker and mapping apisix-base rpm into container
run: |
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
- name: install dependencies in container
run: |
docker exec centos7Instance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo"
docker exec centos7Instance bash -c "yum -y install openresty-openssl111 openresty-pcre openresty-zlib"
- name: install rpm in container
run: |
docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-base-${BUILD_APISIX_BASE_VERSION}-0.el7.x86_64.rpm"
- name: check and ensure apisix-base is installed
run: |
export APISIX_BASE_VER=$(docker exec centos7Instance bash -c "openresty -V" 2>&1 | awk '/-O2 -DAPISIX_BASE_VER=/{print $5}' | awk -v FS="=" '{print $2}')
if [ "$APISIX_BASE_VER" != "${BUILD_APISIX_BASE_VERSION}" ]; then exit 1; fi
- name: Publish Artifact
uses: actions/upload-artifact@v2.2.4
with:
name: apisix-base-${{ env.BUILD_APISIX_BASE_VERSION }}-0.el7.x86_64.rpm
path: output/apisix-base-${{ env.BUILD_APISIX_BASE_VERSION }}-0.el7.x86_64.rpm
retention-days: 5
if-no-files-found: error