diff --git a/.github/workflows/docker-build-releases.yaml b/.github/workflows/docker-build-releases.yaml index a9da88e4..6fe5c7e3 100644 --- a/.github/workflows/docker-build-releases.yaml +++ b/.github/workflows/docker-build-releases.yaml @@ -19,9 +19,15 @@ jobs: with: fetch-depth: 0 - - name: Set SHAIRPORT_SYNC_BRANCH env. + - name: Set SHAIRPORT_SYNC_BRANCH & NQPTP env. run: echo "SHAIRPORT_SYNC_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV + - if: env.SHAIRPORT_SYNC_BRANCH == 'development' + run: echo "NQPTP_BRANCH=development" + + - if: env.SHAIRPORT_SYNC_BRANCH != 'development' + run: echo "NQPTP_BRANCH=master" + - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index dc27674f..d40636a0 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -17,9 +17,15 @@ jobs: with: fetch-depth: 0 - - name: Set SHAIRPORT_SYNC_BRANCH env. + - name: Set SHAIRPORT_SYNC_BRANCH & NQPTP env. run: echo "SHAIRPORT_SYNC_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV + - if: env.SHAIRPORT_SYNC_BRANCH == 'development' + run: echo "NQPTP_BRANCH=development" + + - if: env.SHAIRPORT_SYNC_BRANCH != 'development' + run: echo "NQPTP_BRANCH=master" + - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/docker/Dockerfile b/docker/Dockerfile index 8dc5fe1e..98a3900c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,10 +43,12 @@ RUN make install # Shairport Sync Build System: FROM builder-base AS builder-sps -# This will be modified by the Github Action Workflow and is required -# to ensure the correct branch is being used. +# These will be modified by the Github Action Workflow and are required +# to ensure the correct branches are being used. ARG SHAIRPORT_SYNC_BRANCH RUN test -n "$SHAIRPORT_SYNC_BRANCH" +ARG NQPTP_BRANCH +RUN test -n "$NQPTP_BRANCH" COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/ COPY --from=builder-alac /usr/local/lib/pkgconfig/alac.pc /usr/local/lib/pkgconfig/alac.pc @@ -55,7 +57,7 @@ COPY --from=builder-alac /usr/local/include /usr/local/include RUN git clone https://github.com/mikebrady/nqptp WORKDIR /nqptp # Use development branch for now. -RUN git checkout development +RUN git checkout "$NQPTP_BRANCH" RUN autoreconf -fi RUN ./configure RUN make diff --git a/docker/README.md b/docker/README.md index 883c74af..25df20ec 100644 --- a/docker/README.md +++ b/docker/README.md @@ -29,7 +29,7 @@ Edit the configuration file `/etc/shairport-sync.conf` in the container (or use ## Build Example (for arm7 devices) ``` -docker buildx build --platform linux/arm/v7 -f ./docker/Dockerfile --build-arg SHAIRPORT_SYNC_BRANCH=development -t shairport-sync:unstable-development . +docker buildx build --platform linux/arm/v7 -f ./docker/Dockerfile --build-arg SHAIRPORT_SYNC_BRANCH=development --build-arg NQPTP_BRANCH=development -t shairport-sync:unstable-development . ``` `SHAIRPORT_SYNC_BRANCH` is required to ensure the image is built using the expected branch.