Buildtest server 3.x debian:bookworm-slim (amd64) #18
This file contains 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: Buildtest | |
run-name: Buildtest ${{ github.event.inputs.package }} ${{ github.event.inputs.version }} ${{ github.event.inputs.baseimage }} (${{ github.event.inputs.arch }}) | |
on: | |
workflow_dispatch: | |
inputs: | |
package: | |
type: choice | |
description: Package | |
options: | |
- server | |
- client | |
version: | |
type: choice | |
description: Version | |
options: | |
- 2.x | |
- 3.x | |
arch: | |
type: choice | |
description: Arch | |
options: | |
- arm64 | |
- amd64 | |
baseimage: | |
type: choice | |
description: Base Image | |
options: | |
- debian:bullseye-slim | |
- debian:bookworm-slim | |
- ubuntu:jammy | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build packages | |
run: | | |
if [[ "${{ github.event.inputs.version }}" =~ ^3. ]] || [[ "${GITHUB_REF_NAME}" =~ ^3. ]]; then | |
pbsversion="pbs3" | |
fi | |
[ "${{ github.event.inputs.package }}" = "client" ] && package="client" | |
if [ "${{ github.event.inputs.arch }}" = "arm64" ]; then | |
if [ "${RUNNER_DEBUG}" = "1" ]; then | |
docker buildx build -o packages --build-arg buildoptions="cross github debug ${pbsversion} ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 -f .github/Dockerfile.crosscompile-arm64 . | |
else | |
docker buildx build -o packages --build-arg buildoptions="cross github ${pbsversion} ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 -f .github/Dockerfile.crosscompile-arm64 . | |
fi | |
else | |
if [ "${RUNNER_DEBUG}" = "1" ]; then | |
docker buildx build -o packages --build-arg buildoptions="github debug ${pbsversion} ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 . | |
else | |
docker buildx build -o packages --build-arg buildoptions="github ${pbsversion} ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 . | |
fi | |
fi | |
echo "DEB_VERSION=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: //p')" >> $GITHUB_ENV | |
echo "DEB_VERSION_UPSTREAM=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: \([0-9.]\+\)-[0-9]/\1/p')" >> $GITHUB_ENV | |
- name: Test packages | |
run: | | |
docker buildx build --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/${{ github.event.inputs.arch }} -f .github/Dockerfile.installtest . |