Skip to content

Commit

Permalink
Merge pull request #1 from TheSpad/v6-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad authored Apr 1, 2022
2 parents bcf69d9 + f9b2b4a commit ca33d81
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/call-baseimage-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/call-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/call-check-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
45 changes: 45 additions & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
36 changes: 35 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

0 comments on commit ca33d81

Please sign in to comment.