feat: update GitHub Actions workflow for Docker image build and add Docker installation instructions to README

This commit is contained in:
Andy
2025-07-20 03:17:24 +00:00
parent c30b9112a1
commit 75cd556737
2 changed files with 79 additions and 42 deletions

View File

@@ -2,38 +2,39 @@ name: Build and Publish Docker Image
on:
push:
branches:
- main
- master
paths:
branches: [main, master]
paths: # run only when this file changed at all
- "unshackle/core/__init__.py"
- "Dockerfile"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/docker.yml"
tags:
- "v*"
pull_request:
branches:
- main
- master
paths:
- "unshackle/core/__init__.py"
- "Dockerfile"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/docker.yml"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
pull_request: {} # optional delete if you dont build on PRs
workflow_dispatch: {} # manual override
jobs:
build-and-push:
detect-version-change:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
changed: ${{ steps.vdiff.outputs.changed }}
version: ${{ steps.vdiff.outputs.version }}
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 2 } # we need the previous commit :contentReference[oaicite:1]{index=1}
- name: Extract & compare version
id: vdiff
shell: bash
run: |
current=$(grep -oP '__version__ = "\K[^"]+' unshackle/core/__init__.py)
prev=$(git show HEAD^:unshackle/core/__init__.py \
| grep -oP '__version__ = "\K[^"]+' || echo '')
echo "version=$current" >>"$GITHUB_OUTPUT"
echo "changed=$([ "$current" != "$prev" ] && echo true || echo false)" >>"$GITHUB_OUTPUT"
echo "Current=$current Previous=$prev"
build-and-push:
needs: detect-version-change
if: needs.detect-version-change.outputs.changed == 'true' # only run when bumped :contentReference[oaicite:2]{index=2}
runs-on: ubuntu-latest
permissions: { contents: read, packages: write }
steps:
- name: Checkout repository

View File

@@ -41,11 +41,57 @@ uv tool install git+https://github.com/unshackle-dl/unshackle.git
uvx unshackle --help # or just `unshackle` once PATH updated
```
### Docker Installation
Run unshackle using our pre-built Docker image from GitHub Container Registry:
```bash
# Run with default help command
docker run --rm ghcr.io/unshackle-dl/unshackle:latest
# Check environment dependencies
docker run --rm ghcr.io/unshackle-dl/unshackle:latest env check
# Download content (mount directories for persistent data)
docker run --rm \
-v "$(pwd)/downloads:/downloads" \
-v "$(pwd)/unshackle/cookies:/app/unshackle/cookies" \
-v "$(pwd)/unshackle/services:/app/unshackle/services" \
-v "$(pwd)/unshackle.yaml:/app/unshackle.yaml" \
ghcr.io/unshackle-dl/unshackle:latest dl SERVICE_NAME CONTENT_ID
# Run interactively for configuration
docker run --rm -it \
-v "$(pwd)/unshackle/cookies:/app/unshackle/cookies" \
-v "$(pwd)/unshackle/services:/app/unshackle/services" \
-v "$(pwd)/unshackle.yaml:/app/unshackle.yaml" \
ghcr.io/unshackle-dl/unshackle:latest cfg
```
**Alternative: Build locally**
```bash
# Clone and build your own image
git clone https://github.com/unshackle-dl/unshackle.git
cd unshackle
docker build -t unshackle .
docker run --rm unshackle env check
```
> [!NOTE]
> After installation, you may need to add the installation path to your PATH environment variable if prompted.
> **Recommended:** Use `uv run unshackle` instead of direct command execution to ensure proper virtual environment activation.
## Planned Features
- 🌈 **HDR10+DV Hybrid Support** - Allow support for hybrid HDR10+ and Dolby Vision.
- 🖥️ **Web UI Access & Control** - Manage and control unshackle from a modern web interface.
- 🔄 **Sonarr/Radarr Interactivity** - Direct integration for automated personal downloads.
- ⚙️ **Better ISM Support** - Improve on ISM support for multiple services
- 🔉 **ATMOS** - Better Atmos Support/Selection
- 🎵 **Music** - Cleanup Audio Tagging using the [tags.py](unshackle/core/utils/tags.py) for artist/track name etc.
### Basic Usage
```shell
@@ -53,25 +99,15 @@ uvx unshackle --help # or just `unshackle` once PATH updated
uv run unshackle --help
# Configure your settings
uv run unshackle cfg --help
# Confirm setup and all dependencies exist
uv run automaterr env check
git clone https://github.com/unshackle-dl/unshackle.git
cd unshackle
uv sync
uv run unshackle --help
# Download content (requires configured services)
uv run unshackle dl SERVICE_NAME CONTENT_ID
```
## Planned Features
- 🌈 **HDR10+DV Hybrid Support** - Allow support for hybrid HDR10+ and Dolby Vision.
- 🖥️ **Web UI Access & Control** - Manage and control unshackle from a modern web interface.
- 🔄 **Sonarr/Radarr Interactivity** - Direct integration for automated personal downloads.
- ⚙️ **Better ISM Support** - Improve on ISM support for multiple services
- 🐳 **Docker Image** - Prepared Docker Image with everything ready to go.
- 🔉 **ATMOS** - Better Atmos Support/Selection
- 🎵 **Music** - Cleanup Audio Tagging using the [tags.py](unshackle/core/utils/tags.py) for artist/track name etc.
## Documentation
For comprehensive setup guides, configuration options, and advanced usage: