Skip to content

Commit

Permalink
nextVersion
Browse files Browse the repository at this point in the history
- Update Homebridge Package & FFmpeg Version
  • Loading branch information
donavanbecker authored Nov 21, 2023
2 parents 31d86de + 0625f43 commit 4a11692
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 25 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
# checkout repo
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# setup multi-arch build support
- name: Install Dependencies
Expand All @@ -22,25 +22,25 @@ jobs:
- name: Get Branch / Tag Name
id: get_branch
run: |
export RELEASE_NAME=$(if [[ ${GITHUB_REF} =~ "refs/tags/" ]]; then echo ${GITHUB_REF/refs\/tags\//}; else echo ${GITHUB_REF/refs\/heads\//}; fi)
echo $RELEASE_NAME
echo ::set-output name=NAME::${RELEASE_NAME}
export BRANCH_NAME=$(if [[ ${GITHUB_REF} =~ "refs/tags/" ]]; then echo ${GITHUB_REF/refs\/tags\//}; else echo ${GITHUB_REF/refs\/heads\//}; fi)
echo $BRANCH_NAME
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT
# generate the image tag
- name: Get Image Tag
id: get_tag
run: |
export TARGET_IMAGE_TAG=$(if [ "${{ steps.get_branch.outputs.NAME }}" = "latest" ]; then echo "latest"; else echo "${{ steps.get_branch.outputs.NAME }}"; fi)
export TARGET_IMAGE_TAG=$(if [ "${{ steps.get_branch.outputs.NAME }}" = "latest" ]; then echo "latest"; else echo "${{ steps.get_branch.outputs.BRANCH_NAME }}"; fi)
echo $TARGET_IMAGE_TAG
echo ::set-output name=NAME::${TARGET_IMAGE_TAG}
echo "TARGET_IMAGE_TAG=${TARGET_IMAGE_TAG}" >> $GITHUB_OUTPUT
# generate the alternative image tag
- name: Get Alternate Tag
id: get_alt_tag
run: |
export ALT_IMAGE_TAG=$(if [ "${{ steps.get_branch.outputs.NAME }}" = "latest" ]; then echo "ubuntu"; else echo "${{ steps.get_branch.outputs.NAME }}-ubuntu"; fi)
export ALT_IMAGE_TAG=$(if [ "${{ steps.get_branch.outputs.NAME }}" = "latest" ]; then echo "ubuntu"; else echo "${{ steps.get_branch.outputs.BRANCH_NAME }}-ubuntu"; fi)
echo $ALT_IMAGE_TAG
echo ::set-output name=NAME::${ALT_IMAGE_TAG}
echo "ALT_IMAGE_TAG=${ALT_IMAGE_TAG}" >> $GITHUB_OUTPUT
# login to docker hub
- name: Login to Docker Hub
Expand All @@ -50,7 +50,7 @@ jobs:
# login to github container registry
- name: Login to Packages Container registry
uses: docker/login-action@v1
uses: docker/login-action@v3
if: github.repository == 'homebridge/docker-homebridge'
with:
registry: ghcr.io
Expand All @@ -66,11 +66,11 @@ jobs:
# build the image for Docker Hub
- name: Build Image For Docker Hub
run: |
docker buildx build --push -f Dockerfile --platform linux/amd64,linux/arm/v7,linux/arm64 -t homebridge/homebridge:${{ steps.get_alt_tag.outputs.NAME }} .
docker buildx build --push -f Dockerfile --platform linux/amd64,linux/arm/v7,linux/arm64 -t homebridge/homebridge:${{ steps.get_tag.outputs.NAME }} .
docker buildx build --push -f Dockerfile --platform linux/amd64,linux/arm/v7,linux/arm64 -t homebridge/homebridge:${{ steps.get_alt_tag.outputs.ALT_IMAGE_TAG }} .
docker buildx build --push -f Dockerfile --platform linux/amd64,linux/arm/v7,linux/arm64 -t homebridge/homebridge:${{ steps.get_tag.outputs.TARGET_IMAGE_TAG }} .
# build the image for Github Container Registry (will use the cached build from the previous step)
- name: Build Image For Github Container Registry
run: |
docker buildx build --push -f Dockerfile --platform linux/amd64,linux/arm/v7,linux/arm64 -t ghcr.io/homebridge/homebridge:${{ steps.get_alt_tag.outputs.NAME }} .
docker buildx build --push -f Dockerfile --platform linux/amd64,linux/arm/v7,linux/arm64 -t ghcr.io/homebridge/homebridge:${{ steps.get_tag.outputs.NAME }} .
docker buildx build --push -f Dockerfile --platform linux/amd64,linux/arm/v7,linux/arm64 -t ghcr.io/homebridge/homebridge:${{ steps.get_alt_tag.outputs.ALT_IMAGE_TAG }} .
docker buildx build --push -f Dockerfile --platform linux/amd64,linux/arm/v7,linux/arm64 -t ghcr.io/homebridge/homebridge:${{ steps.get_tag.outputs.TARGET_IMAGE_TAG }} .
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ LABEL org.opencontainers.image.licenses="GPL-3.0"

# update to latest releases prior to release

ENV HOMEBRIDGE_PKG_VERSION=1.0.34 \
FFMPEG_VERSION=v0.1.0
ENV HOMEBRIDGE_PKG_VERSION=1.1.3 \
FFMPEG_VERSION=v2.1.1

ENV S6_OVERLAY_VERSION=3.1.1.2 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
Expand Down Expand Up @@ -51,12 +51,12 @@ RUN case "$(uname -m)" in \

RUN case "$(uname -m)" in \
x86_64) FFMPEG_ARCH='x86_64';; \
armv7l) FFMPEG_ARCH='armv7l';; \
armv7l) FFMPEG_ARCH='arm32v7';; \
aarch64) FFMPEG_ARCH='aarch64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& set -x \
&& curl -Lfs https://github.com/homebridge/ffmpeg-for-homebridge/releases/download/${FFMPEG_VERSION}/ffmpeg-debian-${FFMPEG_ARCH}.tar.gz | tar xzf - -C / --no-same-owner
&& curl -Lfs https://github.com/homebridge/ffmpeg-for-homebridge/releases/download/${FFMPEG_VERSION}/ffmpeg-alpine-${FFMPEG_ARCH}.tar.gz | tar xzf - -C / --no-same-owner

RUN case "$(uname -m)" in \
x86_64) DEB_ARCH='amd64';; \
Expand Down
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ Homebridge requires full access to your local network to function correctly whic

## Usage

Command Line:
### Using [Docker Compose](https://docs.docker.com/compose/) (recommended):

```bash
docker run --net=host --name=homebridge -v $(pwd)/homebridge:/homebridge homebridge/homebridge:latest
```

Using [Docker Compose](https://docs.docker.com/compose/) (recommended):
1. Create the file `docker-compose.yml`

```yml
version: '2'
Expand All @@ -52,8 +48,26 @@ services:
logging:
driver: json-file
options:
max-size: "10mb"
max-file: "1"
max-size: '10m'
max-file: '1'
healthcheck:
test: curl --fail localhost:8581 || exit 1
interval: 60s
retries: 5
start_period: 300s
timeout: 2s
```
2. Start docker with
```bash
docker compose up
```

### Or Command Line:

```bash
docker run --net=host --name=homebridge -v $(pwd)/homebridge:/homebridge homebridge/homebridge:latest
```

## Parameters
Expand Down

0 comments on commit 4a11692

Please sign in to comment.