Skip to content

FreeBSD build

FreeBSD build #66

Workflow file for this run

name: Build container(s) & Upload Artifacts
on:
push:
tags:
- '*'
jobs:
build-container-and-deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push'
strategy:
matrix:
library:
- aws-lc
- libressl
- openssl
steps:
- name: Checkout from GitHub
uses: actions/checkout@v4
- name: Setup qemu
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine Image Version
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# when the branch is main, replace main with latest
[ "$VERSION" == "main" ] && VERSION=latest
echo "VERSION=${VERSION}-${{ matrix.library }}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v4
with:
build-args: SSL_LIBRARY=${{ matrix.library }}
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}:${{ matrix.library }},ghcr.io/${{ github.repository }}:${{ env.VERSION }}
- name: Extract docker build artifacts
run: |
./extract-artifacts.sh ghcr.io/${{ github.repository }} ${{ env.VERSION }} ${{ matrix.library }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/nginx-http3-${{ matrix.library }}-linux-amd64.tar.xz
dist/nginx-http3-${{ matrix.library }}-linux-arm64.tar.xz
freebsd:
runs-on: ubuntu-latest
name: Build FreeBSD version
steps:
- name: Checkout from GitHub
uses: actions/checkout@v4
- uses: vmactions/freebsd-vm@v1
with:
release: "13.2"
usesh: true
prepare: |
pkg install -y cmake git gtar libxml2 libxslt pcre2 rust
run: |
./build-bsd.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
nginx-http3-aws-lc-freebsd.tar.xz