Skip to content

Move binaries build to GitHub Actions #7

Move binaries build to GitHub Actions

Move binaries build to GitHub Actions #7

Workflow file for this run

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 Binaries
runs-on: ubuntu-20.04
strategy:
matrix:
nginx_version:
[
1.17.3,
1.17.8,
1.18.0,
1.19.2,
1.19.3,
1.19.4,
1.19.5,
1.19.6,
1.19.7,
1.19.8,
1.19.9,
1.19.10,
1.20.0,
1.20.1,
1.20.2,
1.21.0,
1.21.1,
1.21.2,
1.21.3,
1.21.4,
1.21.5,
1.21.6,
1.22.0,
1.22.1,
1.23.0,
1.23.1,
1.23.2,
1.23.3,
1.23.4,
1.24.0,
1.25.0,
1.25.1,
1.25.2,
1.25.3,
]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Create/Update Draft
uses: lucacome/[email protected]
with:
minor-label: "enhancement"
major-label: "change"
publish: ${{ github.ref_type == 'tag' }}
collapse-after: 50
if: github.event_name != 'pull_request'
- name: Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build binary
uses: docker/build-push-action@v5
with:
pull: 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
provenance: true
sbom: true
target: export
build-args: NGINX_VERSION=${{ 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@v3
with:
name: linux-amd64-nginx-${{ matrix.nginx_version }}-ngx_http_module.so.tar.gz
path: linux-amd64-nginx-${{ matrix.nginx_version }}-ngx_http_module.so.tar.gz
- name: Upload binaries on release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.ref_type == 'tag'
run: |
gh release upload ${{ github.ref_name }} linux-amd64-nginx-${{ matrix.nginx_version }}-ngx_http_module.so.tar.gz --clobber