chore: only source code should be built #146
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: package apisix-runtime rpm for el7 | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- "v*" | |
paths-ignore: | |
- '*.md' | |
pull_request: | |
branches: [ master ] | |
paths-ignore: | |
- '*.md' | |
schedule: | |
- cron: '0 0 * * *' | |
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=centos image_tag=7 | |
- name: run centos7 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 centos7Instance --net="host" docker.io/centos:7 /bin/bash | |
- name: install rpm in container | |
run: | | |
docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-runtime-${BUILD_APISIX_RUNTIME_VERSION}-0.el7.x86_64.rpm" | |
- name: check and ensure apisix-runtime is installed | |
run: | | |
docker exec centos7Instance bash -c "/usr/local/openresty/bin/etcdctl -h" || exit 1 | |
export APISIX_RUNTIME_VER=$(docker exec centos7Instance 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.el7.x86_64.rpm | |
path: output/apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.el7.x86_64.rpm | |
retention-days: 5 | |
if-no-files-found: error |