-
Notifications
You must be signed in to change notification settings - Fork 98
82 lines (73 loc) · 2.79 KB
/
package-apisix-runtime-deb-openresty-1.21.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: package apisix-runtime deb for debianbullseye-slim with openresty 1.21
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for the release'
required: true
default: ''
pull_request:
jobs:
build:
timeout-minutes: 60
env:
BUILD_APISIX_RUNTIME_VERSION: 1.1.2
strategy:
matrix:
platform:
- runner: ubuntu-22.04
arch: amd64
- runner: buildjet-2vcpu-ubuntu-2204-arm
arch: arm64
runs-on: ${{ matrix.platform.runner }}
steps:
- uses: actions/checkout@v2
with:
ref: openresty/1.21.4
- name: Check arch
run: |
echo "ARCH: ${{ matrix.platform.arch }}"
- name: Install dependencies
run: |
sudo apt-get install -y make ruby ruby-dev rubygems build-essential
- name: Build apisix-runtime deb
run: |
if [ "${{ matrix.platform.arch }}" == "arm64" ]; then
make package type=deb app=apisix-runtime runtime_version=${BUILD_APISIX_RUNTIME_VERSION} image_base=debian image_tag=bullseye-slim arch=linux/arm64/v8
else
make package type=deb app=apisix-runtime runtime_version=${BUILD_APISIX_RUNTIME_VERSION} image_base=debian image_tag=bullseye-slim arch=linux/amd64
fi
- name: Publish Artifact
uses: actions/[email protected]
with:
name: apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~debianbullseye-slim_${{ matrix.platform.arch }}.deb
path: output/apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~debianbullseye-slim_${{ matrix.platform.arch }}.deb
retention-days: 5
if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
env:
BUILD_APISIX_RUNTIME_VERSION: 1.1.2
steps:
- name: Download ARM64 artifact
uses: actions/download-artifact@v3
with:
name: apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~debianbullseye-slim_arm64.deb
path: ./artifacts
- name: Download AMD64 artifact
uses: actions/download-artifact@v3
with:
name: apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~debianbullseye-slim_amd64.deb
path: ./artifacts
- name: Release with Notes
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.tag_name }}
body: |
Release apisix-runtime ${{ github.event.inputs.tag_name }}
files: |
./artifacts/apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~debianbullseye-slim_arm64.deb
./artifacts/apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~debianbullseye-slim_amd64.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}