Version 5.0 Major Release.
New Features:
Multi-Channel and High-Resolution Audio Support
48,000 frames per second ("48k") operation.
48k lossless stereo support.
5.1 and 7.1 surround sound support.
Multi-channel and multi-rate operation on ALSA, PipeWire, PulseAudio, FreeBSD, stdout and Unix pipe output backends.
Automatic Audio Format Selection
Flexible and controllable output format selection.
Automatic rate, sample format, and channel count selection.
Full FFmpeg Integration
Support for transcoding.
Advanced resampling capabilities.
New audio format support.
Enhanced Resampling
New vernier resampling and interpolation method optimized for low-power CPUs.
Better performance on resource-constrained devices.
Convolution and Loudness Enhancements:
Convolution system is now multithreaded and works on stereo and multichannel audio at 48k and 44.1k.
Multiple impulse response (IR) files can now be provided via convolution_ir_files setting.
New convolution_thread_pool_size setting for multithreaded processing (defaults to 1).
Loudness processing now works with stereo and multichannel audio at 48k and 44.1k.
Updated to the most recent HiFi-LoFi FFT convolver.
MQTT Enhancements:
Added new publish_retain boolean option. When enabled, published MQTT messages have the retain flag set, so the MQTT broker stores the last message per topic and new subscribers receive the most recent value immediately. Thanks to lululombard for PR #2142.
D-Bus Enhancements:
Added new dbus_default_message_bus command-line argument (can be system or session) to set the default message bus for both D-Bus native service and MPRIS service.
Performance Improvements:
Enhanced compatibility with AirPlay 2 AutoMix and Smart Tracklists resulting in less unexplained track skipping.
Better operation on low-power devices down to Raspberry Pi B.
Improved efficiency on embedded systems.
Enhanced timestamp handling for better synchronization.
Improved sync error calculation.
Rebuilt buffered audio processor for cleaner handling of immediate and deferred flush requests.
Docker Enhancements:
Reduced Docker image sizes with slimmed-down FFmpeg library.
Removed dhclient from Docker images for smaller footprint.
Bug Fixes:
Fixed MQTT warning on service startup: "Could not establish a mqtt connection". The startup script now correctly states that the mosquitto service is required. Thanks to Hugo Villeneuve for PR #2137.
Fixed compatibility with mbedtls library version 3.4+ (present on recent Linux versions). Thanks to Christian Beier for finding and fixing the bug.
Fixed PulseAudio backend so that PA_ERR_NODATA returns "No latency data yet". Thanks to Vladimir Shakov for the report and fix.
Ensured old flush requests are deleted when a new play session starts. Thanks to saujanyashah for the report.
Fixed format warnings on 64-bit and 32-bit systems
Removed compilation warnings on 32-bit builds
Improved argument checking for debug(), inform(), warn() and die() functions
Fixed "daemon" typos throughout codebase. Thanks to Chris Boot for PR #1981.
Added warning if a convolution impulse response file cannot be read due to bad path or permissions
Build System Improvements:
Unified service file with variable substitution for Avahi support, making it easier to add future service dependencies. Thanks to Hugo Villeneuve.
Network interface selection now only considers interfaces that are up, running and not loopback interfaces. Thanks to Carl Johnson for the suggestion.
Configuration File Changes and Deprecations
New settings: convolution_ir_files (replaces convolution_ir_file), convolution_enabled (replaces convolution), convolution_max_length_in_seconds (replaces convolution_max_length), loudness_enabled (replaces loudness).
New convolution_thread_pool_size setting (defaults to 1).
Deprecated settings: convolution_ir_file, convolution, convolution_max_length, loudness.
Corresponding D-Bus methods and properties have been updated.
Deprecation Notice:
The Jack Audio and soundio backends are deprecated and will be removed in a future release. Consider using the updated PipeWire backend instead.
Documentation Updates
Updated BUILD.md with latest build instructions.
Updated AIRPLAY2.md with feature information.
Enhanced convolution and loudness documentation.
Maintenance:
Fixed FFmpeg deprecation warnings.
Bumped actions/checkout from 6.0.1 to 6.0.2.
Bumped docker/login-action from 3.6.0 to 3.7.0.
Bumped docker/build-push-action from 6.13.0 to 6.15.0.
Bumped docker/setup-qemu-action from 3.4.0 to 3.6.0.
Bumped docker/setup-buildx-action from 3.9.0 to 3.10.0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Basic ALSA configuration for systemd, using a build folder.
|
||||
name: systemd, alsa, pipewire, build folder.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,18 +10,18 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get -y --no-install-recommends install xmltoman libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev
|
||||
run: sudo apt-get -y --no-install-recommends install libpipewire-0.3-dev libplist-utils xmltoman libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev libgcrypt-dev uuid-dev
|
||||
- name: Configure
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
autoreconf -i ..
|
||||
../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2
|
||||
../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd-startup --with-airplay-2 --with-pipewire
|
||||
- name: Make
|
||||
run: |
|
||||
cd build
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Configuration (without pa, soundio or apple-alac) for systemd.
|
||||
name: systemd, alsa, ao, dummy, jack, pipe, stdout
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,16 +10,16 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get -y --no-install-recommends install xmltoman libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libmosquitto-dev avahi-daemon libavahi-client-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev
|
||||
run: sudo apt-get -y --no-install-recommends install libglib2.0-dev libplist-utils xmltoman libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libmosquitto-dev avahi-daemon libavahi-client-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev libgcrypt-dev
|
||||
- name: Configure
|
||||
run: |
|
||||
autoreconf -fi
|
||||
./configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-jack --with-pipe --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2
|
||||
./configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-jack --with-pipe --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd-startup --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2
|
||||
- name: Make
|
||||
run: |
|
||||
make -j
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Configuration (without pa, soundio or apple-alac) for systemd, using a build folder.
|
||||
name: systemd, alsa, pipewire, ao, dummy, jack, pipe, stdout,using a build folder.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,18 +10,18 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get -y --no-install-recommends install xmltoman libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev
|
||||
run: sudo apt-get -y --no-install-recommends install libpipewire-0.3-dev libplist-utils xmltoman libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev libgcrypt-dev
|
||||
- name: Configure
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
autoreconf -i ..
|
||||
../configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-jack --with-pipe --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2
|
||||
../configure --sysconfdir=/etc --with-alsa --with-pipewire --with-ao --with-dummy --with-jack --with-pipe --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd-startup --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2
|
||||
- name: Make
|
||||
run: |
|
||||
cd build
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Configuration (but without pa, soundio, apple-alac) for a System V system.
|
||||
name: systemv, alsa, pipewire, ao, dummy, jack, pipe, stdout
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,16 +10,16 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get -y --no-install-recommends install xmltoman libpopt-dev libdaemon-dev libconfig-dev libasound2-dev libao-dev libjack-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev
|
||||
run: sudo apt-get -y --no-install-recommends install libpipewire-0.3-dev libplist-utils xmltoman libpopt-dev libdaemon-dev libconfig-dev libasound2-dev libao-dev libjack-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev
|
||||
- name: Configure
|
||||
run: |
|
||||
autoreconf -i
|
||||
./configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-libdaemon --with-jack --with-pipe --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemv --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2
|
||||
./configure --sysconfdir=/etc --with-alsa --with-pipewire --with-ao --with-dummy --with-libdaemon --with-jack --with-pipe --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemv-startup --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2
|
||||
- name: Make
|
||||
run: |
|
||||
make -j
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Basic libao configuration for macOS with BREW -- classic only, because macOS can't host NQPTP.
|
||||
name: macos classic, libao, BREW -- classic only, because macOS can't host NQPTP.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: macos-13
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
brew install automake
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Basic ALSA classic configuration for systemd, using a build folder.
|
||||
name: systemd classic, alsa, using a build folder.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,10 +10,10 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get -y --no-install-recommends install xmltoman libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev
|
||||
- name: Configure
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
autoreconf -i ..
|
||||
../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd
|
||||
../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd-startup
|
||||
- name: Make
|
||||
run: |
|
||||
cd build
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Classic (without pa, soundio, apple-alac) for systemd, using a build folder.
|
||||
name: systemd classic, ffmpeg, alsa, pipewire, build folder.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,18 +10,18 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v6.0.2
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get -y --no-install-recommends install xmltoman libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev
|
||||
run: sudo apt-get -y --no-install-recommends install xmltoman libpipewire-0.3-dev libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libavutil-dev libavcodec-dev libavformat-dev
|
||||
- name: Configure
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
autoreconf -i ..
|
||||
../configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-pipe --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client
|
||||
../configure --sysconfdir=/etc --with-ffmpeg --with-alsa --with-pipewire --with-ao --with-dummy --with-pipe --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-systemd-startup
|
||||
- name: Make
|
||||
run: |
|
||||
cd build
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
# Builds a docker image when a commit is made. Also pushes the build if the branch is 'master' or 'development'.
|
||||
|
||||
# Tag pattern
|
||||
# 'master' - rolling, rolling-classic
|
||||
# 'development' - development, development-classic
|
||||
|
||||
name: Build and push docker (push/pull request)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- development
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
|
||||
env:
|
||||
DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||
NQPTP_BRANCH: main
|
||||
|
||||
jobs:
|
||||
test-build-on-pull-request:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{github.event.pull_request.head.ref}}
|
||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||
|
||||
- name: Set SHAIRPORT_SYNC_BRANCH env
|
||||
run: |
|
||||
SHAIRPORT_SYNC_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "Current SHAIRPORT_SYNC_BRANCH set to ${SHAIRPORT_SYNC_BRANCH}"
|
||||
echo "SHAIRPORT_SYNC_BRANCH=${SHAIRPORT_SYNC_BRANCH}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.3.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.8.0
|
||||
|
||||
- name: Build (classic)
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
context: ./
|
||||
file: ./docker/classic/Dockerfile
|
||||
push: false
|
||||
build-args: |
|
||||
SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }}
|
||||
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
context: ./
|
||||
file: ./docker/Dockerfile
|
||||
push: false
|
||||
build-args: |
|
||||
SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }}
|
||||
NQPTP_BRANCH=${{ env.NQPTP_BRANCH }}
|
||||
|
||||
build-and-publish:
|
||||
if: github.event_name != 'pull_request'
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set SHAIRPORT_SYNC_BRANCH env.
|
||||
run: echo "SHAIRPORT_SYNC_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Is branch "master"?
|
||||
if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'master' }}
|
||||
run: |
|
||||
echo "IMAGE_TAG_BASE=rolling" >> $GITHUB_ENV
|
||||
|
||||
- name: Is branch "development"?
|
||||
if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'development' }}
|
||||
run: |
|
||||
echo "NQPTP_BRANCH=development" >> $GITHUB_ENV
|
||||
echo "IMAGE_TAG_BASE=development" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.3.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.8.0
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3.3.0
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push (classic)
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
context: ./
|
||||
file: ./docker/classic/Dockerfile
|
||||
platforms: ${{ env.DOCKER_PLATFORMS }}
|
||||
push: ${{ env.IMAGE_TAG_BASE != '' }}
|
||||
tags: ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.IMAGE_TAG_BASE }}-classic
|
||||
build-args: |
|
||||
SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
context: ./
|
||||
file: ./docker/Dockerfile
|
||||
platforms: ${{ env.DOCKER_PLATFORMS }}
|
||||
push: ${{ env.IMAGE_TAG_BASE != '' }}
|
||||
tags: ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.IMAGE_TAG_BASE }}
|
||||
build-args: |
|
||||
SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }}
|
||||
NQPTP_BRANCH=${{ env.NQPTP_BRANCH }}
|
||||
@@ -1,87 +0,0 @@
|
||||
# Builds & pushes a docker image when a tag is created.
|
||||
# Tag pattern: '[tag]' & '[tag]-classic'
|
||||
# 'latest' & 'classic' also, when master tagged.
|
||||
|
||||
# Only pushes the tag when it matches one of the following patterns:
|
||||
# X, X.Y or X.Y.Z
|
||||
|
||||
name: Build and push docker (tag)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+' # X
|
||||
- '[0-9]+\.[0-9]+' # X.Y
|
||||
- '[0-9]+\.[0-9]+\.[0-9]+' # X.Y.Z
|
||||
|
||||
env:
|
||||
DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm64,linux/arm/v7
|
||||
NQPTP_BRANCH: main
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set SHAIRPORT_SYNC_BRANCH env.
|
||||
run: |
|
||||
raw=$(git branch -r --contains ${{ github.ref }})
|
||||
branch=${raw##*/}
|
||||
echo "SHAIRPORT_SYNC_BRANCH=${branch}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set tag env
|
||||
run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Is branch "master"?
|
||||
if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'master' }}
|
||||
run: echo "LATEST_TAG=true" >> $GITHUB_ENV
|
||||
|
||||
- name: Is branch "development"?
|
||||
if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'development' }}
|
||||
run: |
|
||||
echo "NQPTP_BRANCH=development" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.3.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.8.0
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3.3.0
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push (classic)
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
context: ./
|
||||
file: ./docker/classic/Dockerfile
|
||||
platforms: ${{ env.DOCKER_PLATFORMS }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.GIT_TAG }}-classic
|
||||
${{ env.LATEST_TAG == 'true' && format('{0}:classic', secrets.DOCKER_IMAGE_NAME) || '' }}
|
||||
build-args: |
|
||||
SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6.13.0
|
||||
with:
|
||||
context: ./
|
||||
file: ./docker/Dockerfile
|
||||
platforms: ${{ env.DOCKER_PLATFORMS }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.GIT_TAG }}
|
||||
${{ env.LATEST_TAG == 'true' && format('{0}:latest', secrets.DOCKER_IMAGE_NAME) || '' }}
|
||||
build-args: |
|
||||
SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }}
|
||||
NQPTP_BRANCH=${{ env.NQPTP_BRANCH }}
|
||||
@@ -0,0 +1,95 @@
|
||||
# Builds and pushes a docker image in the following scenarios:
|
||||
# When a commit is made to 'master' or 'development'.
|
||||
# Tag pattern
|
||||
# 'master' - rolling, rolling-classic
|
||||
# 'development' - development, development-classic
|
||||
|
||||
# When a tag is created.
|
||||
# Tag pattern: '[tag]' & '[tag]-classic'
|
||||
|
||||
# TODO: Does not currently push 'latest' or 'classic' tags.
|
||||
|
||||
# Builds but does not push a docker image for PRs.
|
||||
|
||||
name: Build and conditionally push docker image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- development
|
||||
tags:
|
||||
- "*"
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
docker-vars:
|
||||
uses: ./.github/workflows/docker-vars.yaml
|
||||
|
||||
build-docker-image-and-publish:
|
||||
name: Build and conditionally push docker image
|
||||
needs:
|
||||
- docker-vars
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: classic
|
||||
dockerfile: ./docker/classic/Dockerfile
|
||||
tag_suffix: "-classic-rc"
|
||||
build_args: |
|
||||
SHAIRPORT_SYNC_BRANCH=.
|
||||
- name: main
|
||||
dockerfile: ./docker/Dockerfile
|
||||
tag_suffix: "-rc"
|
||||
build_args: |
|
||||
SHAIRPORT_SYNC_BRANCH=.
|
||||
NQPTP_BRANCH=${{ needs.docker-vars.outputs.nqptp_branch }}
|
||||
|
||||
steps:
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3.7.0
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
|
||||
if: needs.docker-vars.outputs.push_docker_image == 'true'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.7.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.12.0
|
||||
|
||||
- name: Checkout shairport sync repo
|
||||
uses: actions/checkout@v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build and push ${{ matrix.name }}
|
||||
uses: docker/build-push-action@v6.18.0
|
||||
env:
|
||||
registry_and_name: ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_IMAGE_NAME }}
|
||||
with:
|
||||
context: ./
|
||||
file: ${{ matrix.dockerfile }}
|
||||
platforms: ${{ needs.docker-vars.outputs.docker_platforms }}
|
||||
push: ${{ needs.docker-vars.outputs.push_docker_image == 'true' }}
|
||||
# Assign tags based on branch or tag type for clarity
|
||||
tags: |
|
||||
${{ github.ref_type == 'branch' && github.ref_name == 'development'
|
||||
&& format('{0}:development{1}', env.registry_and_name, matrix.tag_suffix) || '' }}
|
||||
|
||||
${{ github.ref_type == 'branch' && github.ref_name == 'master'
|
||||
&& format('{0}:rolling{1}', env.registry_and_name, matrix.tag_suffix) || '' }}
|
||||
|
||||
${{ github.ref_type == 'tag'
|
||||
&& format('{0}:{1}{2}', env.registry_and_name, github.ref_name, matrix.tag_suffix) || '' }}
|
||||
build-args: |
|
||||
${{ matrix.build_args }}
|
||||
|
||||
# TODO: Fix pushing of 'latest' and 'classic' tags.
|
||||
# env.is_tag == 'true' && env.branch_name == 'master' && format('{0}:latest{1}', env.registry_and_name, matrix.tag_suffix) || ''
|
||||
@@ -0,0 +1,46 @@
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
docker_platforms:
|
||||
description: "The docker platforms to build for."
|
||||
value: ${{ jobs.docker-vars.outputs.docker_platforms }}
|
||||
nqptp_branch:
|
||||
description: "The NQPTP branch."
|
||||
value: ${{ jobs.docker-vars.outputs.nqptp_branch }}
|
||||
push_docker_image:
|
||||
description: "Whether to push the docker image."
|
||||
value: ${{ jobs.docker-vars.outputs.push_docker_image }}
|
||||
|
||||
jobs:
|
||||
docker-vars:
|
||||
name: Set variables required for docker build.
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
NQPTP_BRANCH: main
|
||||
PUSH_DOCKER_IMAGE: "false"
|
||||
outputs:
|
||||
nqptp_branch: ${{ env.NQPTP_BRANCH }}
|
||||
push_docker_image: ${{ env.PUSH_DOCKER_IMAGE }}
|
||||
docker_platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||
steps:
|
||||
- name: Push docker image if this is a tag.
|
||||
if: github.ref_type == 'tag'
|
||||
run: |
|
||||
echo "PUSH_DOCKER_IMAGE=true" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Push docker image if this is the "master" or "development" branch.
|
||||
if: |
|
||||
github.ref_type == 'branch' &&
|
||||
(
|
||||
github.ref_name == 'master' ||
|
||||
github.ref_name == 'development'
|
||||
)
|
||||
run: |
|
||||
echo "PUSH_DOCKER_IMAGE=true" >> "$GITHUB_ENV"
|
||||
|
||||
- name: If 'development' branch, set NQPTP_BRANCH to 'development'.
|
||||
if: |
|
||||
github.ref_type == 'branch' &&
|
||||
github.ref_name == 'development'
|
||||
run: |
|
||||
echo "NQPTP_BRANCH=development" >> "$GITHUB_ENV"
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v9.1.0
|
||||
- uses: actions/stale@v10.1.1
|
||||
with:
|
||||
stale-issue-message: 'This issue has been inactive for 28 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.'
|
||||
stale-pr-message: 'This PR has been inactive for 28 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.'
|
||||
|
||||
Reference in New Issue
Block a user