Skip to content

Commit

Permalink
Merge pull request #1961 from charlesomer/development
Browse files Browse the repository at this point in the history
Upgrade docker images and GitHub action versions. Pin to ubuntu-22.04.
  • Loading branch information
mikebrady authored Jan 29, 2025
2 parents 08063e6 + e0e3c45 commit 7367d04
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 37 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/docker-build-on-push_and_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ name: Build and push docker (push/pull request)

on:
workflow_dispatch:
# push:
# branches:
# - master
# - development
# pull_request:
# types: [opened, synchronize, reopened, ready_for_review]
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
Expand All @@ -22,10 +22,10 @@ env:
jobs:
test-build-on-pull-request:
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
Expand All @@ -38,13 +38,13 @@ jobs:
echo "SHAIRPORT_SYNC_BRANCH=${SHAIRPORT_SYNC_BRANCH}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
uses: docker/setup-qemu-action@v3.3.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.5.0
uses: docker/setup-buildx-action@v3.8.0

- name: Build (classic)
uses: docker/build-push-action@v4.0.0
uses: docker/build-push-action@v6.13.0
with:
context: ./
file: ./docker/classic/Dockerfile
Expand All @@ -53,7 +53,7 @@ jobs:
SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }}
- name: Build
uses: docker/build-push-action@v4.0.0
uses: docker/build-push-action@v6.13.0
with:
context: ./
file: ./docker/Dockerfile
Expand All @@ -64,10 +64,10 @@ jobs:
build-and-publish:
if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0

Expand All @@ -86,20 +86,20 @@ jobs:
echo "IMAGE_TAG_BASE=development" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
uses: docker/setup-qemu-action@v3.3.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.5.0
uses: docker/setup-buildx-action@v3.8.0

- name: Login to Docker Registry
uses: docker/login-action@v2.1.0
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@v4.0.0
uses: docker/build-push-action@v6.13.0
with:
context: ./
file: ./docker/classic/Dockerfile
Expand All @@ -110,7 +110,7 @@ jobs:
SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }}
- name: Build and push
uses: docker/build-push-action@v4.0.0
uses: docker/build-push-action@v6.13.0
with:
context: ./
file: ./docker/Dockerfile
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docker-build-on-tag.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Builds & pushes a docker image when a tag is created.
# 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
# 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
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-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down
16 changes: 9 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG NQPTP_BRANCH=main
ARG SHAIRPORT_SYNC_BRANCH=.

FROM alpine:3.17 AS builder
FROM alpine:3.20 AS builder

RUN apk -U add \
alsa-lib-dev \
Expand Down Expand Up @@ -32,7 +32,7 @@ RUN git clone --depth=1 https://github.com/mikebrady/alac
WORKDIR /alac
RUN autoreconf -i
RUN ./configure
RUN make
RUN make -j $(nproc)
RUN make install
WORKDIR /
##### ALAC END #####
Expand All @@ -44,7 +44,7 @@ RUN git clone --depth=1 -b "$NQPTP_BRANCH" https://github.com/mikebrady/nqptp
WORKDIR /nqptp
RUN autoreconf -i
RUN ./configure
RUN make
RUN make -j $(nproc)
WORKDIR /
##### NQPTP END #####

Expand Down Expand Up @@ -90,7 +90,7 @@ COPY --from=shairport-sync /shairport-sync/build/install/etc/dbus-1/system.d/sha
##### END BUILD FILES #####

# Shairport Sync Runtime System
FROM crazymax/alpine-s6:3.17-3.1.1.2
FROM crazymax/alpine-s6:3.20-3.2.0.2

ENV S6_CMD_WAIT_FOR_SERVICES=1
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
Expand All @@ -108,7 +108,7 @@ RUN apk -U add \
libgcrypt \
libplist \
libpulse \
libressl3.6-libcrypto \
libressl3.8-libcrypto \
libsndfile \
libsodium \
libuuid \
Expand All @@ -118,8 +118,10 @@ RUN apk -U add \
mosquitto \
popt \
soxr \
curl && \
rm -rfv /lib/apk/db/* && \
curl \
dhclient

RUN rm -rfv /lib/apk/db/* && \
rm -rfv /etc/avahi/services/*.service && \
addgroup shairport-sync && \
adduser -D shairport-sync -G shairport-sync && \
Expand Down
6 changes: 3 additions & 3 deletions docker/classic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG SHAIRPORT_SYNC_BRANCH=.

FROM alpine:3.17 AS builder
FROM alpine:3.20 AS builder

# Classic (aka AirPlay 1) Build

Expand Down Expand Up @@ -31,7 +31,7 @@ RUN git clone https://github.com/mikebrady/alac
WORKDIR /alac
RUN autoreconf -i
RUN ./configure
RUN make
RUN make -j $(nproc)
RUN make install
WORKDIR /
##### ALAC END #####
Expand All @@ -52,7 +52,7 @@ WORKDIR /
##### SPS END #####

# Shairport Sync Runtime System
FROM crazymax/alpine-s6:3.17-3.1.1.2
FROM crazymax/alpine-s6:3.20-3.2.0.2

ENV S6_CMD_WAIT_FOR_SERVICES=1
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
Expand Down

0 comments on commit 7367d04

Please sign in to comment.