diff --git a/.github/workflows/call-baseimage-update.yml b/.github/workflows/call-baseimage-update.yml index b7770ca..d1a0eaa 100644 --- a/.github/workflows/call-baseimage-update.yml +++ b/.github/workflows/call-baseimage-update.yml @@ -6,7 +6,7 @@ on: jobs: call-workflow: - uses: thespad/actions/.github/workflows/check-baseimage-update.yml@v5.1.0 + uses: thespad/actions/.github/workflows/check-baseimage-update.yml@v6 with: repo_owner: ${{ github.repository_owner }} baseimage: "alpine" diff --git a/.github/workflows/call-build-image.yml b/.github/workflows/call-build-image.yml index 06f310b..61a804c 100644 --- a/.github/workflows/call-build-image.yml +++ b/.github/workflows/call-build-image.yml @@ -7,11 +7,12 @@ on: jobs: call-workflow: - uses: thespad/actions/.github/workflows/build-image.yml@v5.1.0 + uses: thespad/actions/.github/workflows/build-image.yml@v6 with: repo_owner: ${{ github.repository_owner }} app_name: "whisparr" release_type: "script" dockerhub_user: "thespad" + target-arch: "amd64,aarch64,armhf" secrets: dockerhub_password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/call-check-and-release.yml b/.github/workflows/call-check-and-release.yml index 2832584..e654458 100644 --- a/.github/workflows/call-check-and-release.yml +++ b/.github/workflows/call-check-and-release.yml @@ -7,7 +7,7 @@ on: jobs: call-workflow: - uses: thespad/actions/.github/workflows/check-and-release.yml@v5.1.0 + uses: thespad/actions/.github/workflows/check-and-release.yml@v6 with: repo_owner: ${{ github.repository_owner }} app_name: "whisparr" diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 new file mode 100644 index 0000000..a544fd0 --- /dev/null +++ b/Dockerfile.aarch64 @@ -0,0 +1,45 @@ +FROM ghcr.io/linuxserver/baseimage-alpine:3.15 + +# set version label +ARG BUILD_DATE +ARG VERSION +ARG APP_VERSION +LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE}" +LABEL maintainer="thespad" + +# environment settings +ARG APP_BRANCH="nightly" +ENV XDG_CONFIG_HOME="/config/xdg" + +RUN \ + echo "**** install packages ****" && \ + apk add -U --upgrade --no-cache \ + curl \ + jq \ + icu-libs \ + sqlite-libs && \ + echo "**** install whisparr ****" && \ + mkdir -p /app/whisparr/bin && \ + if [ -z ${APP_VERSION+x} ]; then \ + APP_VERSION=$(curl -sL "https://whisparr.servarr.com/v1/update/${APP_BRANCH}/changes?runtime=netcore&os=linuxmusl" \ + | jq -r '.[0].version'); \ + fi && \ + curl -o \ + /tmp/whisparr.tar.gz -L \ + "https://whisparr.servarr.com/v1/update/${APP_BRANCH}/updatefile?version=${APP_VERSION}&os=linuxmusl&runtime=netcore&arch=arm64" && \ + tar xzf \ + /tmp/whisparr.tar.gz -C \ + /app/whisparr/bin --strip-components=1 && \ + echo -e "UpdateMethod=docker\nBranch=${APP_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=[thespad](https://github.com/thespad)" > /app/whisparr/package_info && \ + echo "**** cleanup ****" && \ + rm -rf \ + /app/whisparr/bin/Whisparr.Update \ + /tmp/* \ + /var/tmp/* + +# copy local files +COPY root/ / + +# ports and volumes +EXPOSE 6969 +VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf new file mode 100644 index 0000000..25c732b --- /dev/null +++ b/Dockerfile.armhf @@ -0,0 +1,45 @@ +FROM ghcr.io/linuxserver/baseimage-alpine:3.15 + +# set version label +ARG BUILD_DATE +ARG VERSION +ARG APP_VERSION +LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE}" +LABEL maintainer="thespad" + +# environment settings +ARG APP_BRANCH="nightly" +ENV XDG_CONFIG_HOME="/config/xdg" + +RUN \ + echo "**** install packages ****" && \ + apk add -U --upgrade --no-cache \ + curl \ + jq \ + icu-libs \ + sqlite-libs && \ + echo "**** install whisparr ****" && \ + mkdir -p /app/whisparr/bin && \ + if [ -z ${APP_VERSION+x} ]; then \ + APP_VERSION=$(curl -sL "https://whisparr.servarr.com/v1/update/${APP_BRANCH}/changes?runtime=netcore&os=linuxmusl" \ + | jq -r '.[0].version'); \ + fi && \ + curl -o \ + /tmp/whisparr.tar.gz -L \ + "https://whisparr.servarr.com/v1/update/${APP_BRANCH}/updatefile?version=${APP_VERSION}&os=linuxmusl&runtime=netcore&arch=arm" && \ + tar xzf \ + /tmp/whisparr.tar.gz -C \ + /app/whisparr/bin --strip-components=1 && \ + echo -e "UpdateMethod=docker\nBranch=${APP_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=[thespad](https://github.com/thespad)" > /app/whisparr/package_info && \ + echo "**** cleanup ****" && \ + rm -rf \ + /app/whisparr/bin/Whisparr.Update \ + /tmp/* \ + /var/tmp/* + +# copy local files +COPY root/ / + +# ports and volumes +EXPOSE 6969 +VOLUME /config diff --git a/README.md b/README.md index 082fa1e..0fcdad9 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ The architectures supported by this image are: | Architecture | Available | Tag | | :----: | :----: | ---- | | x86-64 | ✅ | latest | -| arm64 | ❌ | latest | -| armhf | ❌ | latest | +| arm64 | ✅ | latest | +| armhf | ✅ | latest | ## Versions diff --git a/docker-bake.hcl b/docker-bake.hcl index c318484..6591d68 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -13,9 +13,43 @@ target "image-local" { output = ["type=docker"] } -target "image-all" { +target "amd64" { inherits = ["image"] + dockerfile = "Dockerfile" platforms = [ "linux/amd64" ] } + +target "aarch64" { + inherits = ["image"] + dockerfile = "Dockerfile.aarch64" + platforms = [ + "linux/arm64" + ] +} + +target "armhf" { + inherits = ["image"] + dockerfile = "Dockerfile.armhf" + platforms = [ + "linux/arm/v7" + ] +} + +target "64" { + inherits = ["image"] + platforms = [ + "linux/amd64", + "linux/arm64" + ] +} + +target "all" { + inherits = ["image"] + platforms = [ + "linux/amd64", + "linux/arm64", + "linux/arm/v7" + ] +}