-
Notifications
You must be signed in to change notification settings - Fork 121
53 lines (46 loc) · 1.44 KB
/
ci.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: CI
on:
push:
branches:
- master
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches:
- master
concurrency:
group: ${{ github.ref_name }}-ci
cancel-in-progress: true
jobs:
build-binaries:
name: Build Docker Image
runs-on: ubuntu-20.04
strategy:
matrix:
nginx_version: [1.25.0, 1.25.1, 1.25.2, 1.25.3]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build binary
uses: docker/build-push-action@v5
with:
pull: true
load: true
push: false
file: build/Dockerfile
tags: ${{ matrix.nginx_version }}
cache-from: type=gha,scope=${{ matrix.nginx_version }}
cache-to: type=gha,scope=${{ matrix.nginx_version }},mode=max
target: final
build-args: NGINX_VERSIONS=${{ matrix.nginx_version }}
outputs: type=tar,dest=linux-amd64-nginx-${{ matrix.nginx_version }}-ngx_http_module.so.tar
- name: Compress tar
run: |
gzip -9 linux-amd64-nginx-${{ matrix.nginx_version }}-ngx_http_module.so.tar
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: linux-amd64-nginx-${{ matrix.nginx_version }}-ngx_http_module.so.tgz
path: linux-amd64-nginx-${{ matrix.nginx_version }}-ngx_http_module.so.tar.gz