Skip to content

Commit

Permalink
Refactor build action, OpenSSL 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanoostenrijk committed Oct 26, 2024
1 parent 7b986d6 commit d56d8f8
Show file tree
Hide file tree
Showing 10 changed files with 479 additions and 166 deletions.
88 changes: 77 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ on:
- '*'

jobs:
build-container-and-deploy:
build-linux-containers:
runs-on: ubuntu-latest
name: Build Linux Containers
if: github.event_name == 'push'
strategy:
matrix:
library:
- "libressl"
- "openssl"
- "wolfssl"
- "aws-lc"
- libressl
- openssl
- wolfssl
- aws-lc
steps:
- name: Checkout from GitHub
uses: actions/checkout@v4
Expand All @@ -39,20 +40,85 @@ jobs:
[ "$VERSION" == "main" ] && VERSION=latest
echo "VERSION=${VERSION}-${{ matrix.library }}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
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
id: extract_artifacts
shell: bash
run: |
./extract-artifacts.sh ghcr.io/${{ github.repository }} ${{ env.VERSION }} ${{ matrix.library }}
- name: Release
uses: softprops/action-gh-release@v1
./scripts/extract-artifacts.sh ghcr.io/${{ github.repository }} ${{ env.VERSION }} ${{ matrix.library }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
files: |
name: haproxy-${{ matrix.library }}
path: |
dist/haproxy-http3-${{ matrix.library }}-linux-amd64.tar.xz
dist/haproxy-http3-${{ matrix.library }}-linux-arm64.tar.xz
dist/version.txt
retention-days: 1

release:
needs:
- build-linux-containers
runs-on: ubuntu-latest
name: Create Release
steps:
- name: Checkout from GitHub
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: haproxy-*
- name: Release Text
shell: bash
run: |
platforms=("linux-amd64" "linux-arm64")
libraries=("aws-lc" "libressl" "openssl" "wolfssl")
git log -1 --no-merges --pretty=%B > ./release.txt
echo "#### Versions:" >> ./release.txt
for library in ${libraries[@]}; do
VERSION=$(cat ./haproxy-${library}/version.txt | awk '{ print " " $0 }')
echo " - haproxy-${library}" >> ./release.txt
echo " <details>" >> ./release.txt
echo " <summary>Version information</summary>" >> ./release.txt
echo "" >> ./release.txt
echo "${VERSION}" >> ./release.txt
echo " </details>" >> ./release.txt
done
echo "#### SHA256 Checksums:" >> ./release.txt
for library in ${libraries[@]}; do
for platform in ${platforms[@]}; do
echo " haproxy-${library}-${platform}.tar.xz: $(sha256sum ./haproxy-${library}/haproxy-http3-${library}-${platform}.tar.xz | cut -d ' ' -f 1)" >> ./release.txt
done
echo "" >> ./release.txt
done
- name: Release
uses: softprops/action-gh-release@v2
with:
body_path: ./release.txt
files: |
./haproxy-aws-lc/haproxy-http3-aws-lc-linux-amd64.tar.xz
./haproxy-aws-lc/haproxy-http3-aws-lc-linux-arm64.tar.xz
./haproxy-libressl/haproxy-http3-libressl-linux-amd64.tar.xz
./haproxy-libressl/haproxy-http3-libressl-linux-arm64.tar.xz
./haproxy-openssl/haproxy-http3-openssl-linux-amd64.tar.xz
./haproxy-openssl/haproxy-http3-openssl-linux-arm64.tar.xz
./haproxy-wolfssl/haproxy-http3-wolfssl-linux-amd64.tar.xz
./haproxy-wolfssl/haproxy-http3-wolfssl-linux-arm64.tar.xz
- name: Remove old packages
uses: actions/delete-package-versions@v5
with:
package-name: 'haproxy-http3'
package-type: 'container'
min-versions-to-keep: 10
Loading

0 comments on commit d56d8f8

Please sign in to comment.