haproxy v3.4.1, aws-lc v5.1.0 #160
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build container(s) & Upload Artifacts | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build-linux-containers: | |
| name: Build ${{ matrix.library }} (${{ matrix.arch }}) | |
| if: github.event_name == 'push' | |
| strategy: | |
| matrix: | |
| library: | |
| # - libressl | |
| # - openssl | |
| # - wolfssl | |
| - aws-lc | |
| os: | |
| - ubuntu-latest | |
| - ubuntu-24.04-arm | |
| include: | |
| - os: ubuntu-latest | |
| arch: amd64 | |
| platform: linux/amd64 | |
| - os: ubuntu-24.04-arm | |
| arch: arm64 | |
| platform: linux/arm64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout from GitHub | |
| uses: actions/checkout@v6 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4 | |
| 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 (per-arch) | |
| uses: docker/build-push-action@v7 | |
| with: | |
| build-args: SSL_LIBRARY=${{ matrix.library }} | |
| context: . | |
| platforms: ${{ matrix.platform }} | |
| provenance: false | |
| push: true | |
| tags: ghcr.io/${{ github.repository }}:${{ matrix.library }}-${{ matrix.arch }},ghcr.io/${{ github.repository }}:${{ env.VERSION }}-${{ matrix.arch }} | |
| - name: Extract docker build artifacts | |
| shell: bash | |
| run: | | |
| ./scripts/extract-artifacts.sh ghcr.io/${{ github.repository }} ${{ env.VERSION }}-${{ matrix.arch }} ${{ matrix.library }} ${{ matrix.platform }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: haproxy-${{ matrix.library }}-${{ matrix.arch }} | |
| path: | | |
| dist/haproxy-http3-${{ matrix.library }}-linux-${{ matrix.arch }}.tar.xz | |
| dist/version-${{ matrix.library }}.txt | |
| retention-days: 1 | |
| manifest: | |
| needs: | |
| - build-linux-containers | |
| runs-on: ubuntu-latest | |
| name: Create Multi-Arch Manifest | |
| strategy: | |
| matrix: | |
| library: | |
| # - libressl | |
| # - openssl | |
| # - wolfssl | |
| - aws-lc | |
| steps: | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Determine Image Version | |
| run: | | |
| VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
| [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
| [ "$VERSION" == "main" ] && VERSION=latest | |
| echo "VERSION=${VERSION}-${{ matrix.library }}" >> $GITHUB_ENV | |
| - name: Create and push multi-arch manifest | |
| run: | | |
| IMAGE=ghcr.io/${{ github.repository }} | |
| # Create manifest for library tag (e.g. :aws-lc) | |
| docker manifest create ${IMAGE}:${{ matrix.library }} \ | |
| ${IMAGE}:${{ matrix.library }}-amd64 \ | |
| ${IMAGE}:${{ matrix.library }}-arm64 | |
| docker manifest push ${IMAGE}:${{ matrix.library }} | |
| # Create manifest for versioned tag (e.g. :1.0.0-aws-lc) | |
| docker manifest create ${IMAGE}:${{ env.VERSION }} \ | |
| ${IMAGE}:${{ env.VERSION }}-amd64 \ | |
| ${IMAGE}:${{ env.VERSION }}-arm64 | |
| docker manifest push ${IMAGE}:${{ env.VERSION }} | |
| release: | |
| needs: | |
| - build-linux-containers | |
| - manifest | |
| runs-on: ubuntu-latest | |
| name: Create Release | |
| steps: | |
| - name: Checkout from GitHub | |
| uses: actions/checkout@v6 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| merge-multiple: true | |
| pattern: haproxy-* | |
| - name: Release Text | |
| shell: bash | |
| run: | | |
| platforms=("linux-amd64" "linux-arm64") | |
| #libraries=("aws-lc" "libressl" "openssl" "wolfssl") | |
| libraries=("aws-lc") | |
| git log -1 --no-merges --pretty=%B > ./release.txt | |
| echo "#### Versions:" >> ./release.txt | |
| for library in ${libraries[@]}; do | |
| VERSION=$(cat ./version-${library}.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-http3-${library}-${platform}.tar.xz | cut -d ' ' -f 1)" >> ./release.txt | |
| done | |
| echo "" >> ./release.txt | |
| done | |
| - name: Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| body_path: ./release.txt | |
| files: | | |
| ./haproxy-http3-aws-lc-linux-amd64.tar.xz | |
| ./haproxy-http3-aws-lc-linux-arm64.tar.xz | |
| # ./haproxy-http3-libressl-linux-amd64.tar.xz | |
| # ./haproxy-http3-libressl-linux-arm64.tar.xz | |
| # ./haproxy-http3-openssl-linux-amd64.tar.xz | |
| # ./haproxy-http3-openssl-linux-arm64.tar.xz | |
| # ./haproxy-http3-wolfssl-linux-amd64.tar.xz | |
| # ./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 |