-
Notifications
You must be signed in to change notification settings - Fork 96
53 lines (45 loc) · 1.96 KB
/
package-apisix-runtime-rpm-ubi.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-runtime rpm for ubi
on:
push:
branches: [ master ]
tags:
- "v*"
paths-ignore:
- '*.md'
pull_request:
branches: [ master ]
paths-ignore:
- '*.md'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
BUILD_APISIX_RUNTIME_VERSION: 1.0.1
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt-get install -y make ruby ruby-dev rubygems build-essential
- name: build apisix-runtime rpm
run: |
make package type=rpm app=apisix-runtime runtime_version=${BUILD_APISIX_RUNTIME_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6
- name: run ubi8 docker and mapping apisix-runtime rpm into container
run: |
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name ubiInstance --net="host" registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
- name: install rpm in container
run: |
docker exec ubiInstance bash -c "ls -la /output"
docker exec ubiInstance bash -c "yum -y localinstall /output/apisix-runtime-${BUILD_APISIX_RUNTIME_VERSION}-0.ubi8.6.x86_64.rpm"
- name: check and ensure apisix-runtime is installed
run: |
docker exec ubiInstance bash -c "/usr/local/openresty/bin/etcdctl -h" || exit 1
export APISIX_RUNTIME_VER=$(docker exec ubiInstance bash -c "openresty -V" 2>&1 | awk '/-O2 -DAPISIX_RUNTIME_VER=/{print $5}' | awk -v FS="=" '{print $2}')
if [ "$APISIX_RUNTIME_VER" != "${BUILD_APISIX_RUNTIME_VERSION}" ]; then exit 1; fi
- name: Publish Artifact
uses: actions/[email protected]
with:
name: apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.ubi8.6.x86_64.rpm
path: output/apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.ubi8.6.x86_64.rpm
retention-days: 5
if-no-files-found: error