diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..dc31397 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,46 @@ +name: Build and Publish Docker Image + +on: + push: + branches: + - main + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=sha + type=raw,value=latest + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index f67212c..64529eb 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,15 @@ https://github.com/user-attachments/assets/419d3e50-c933-444b-8cab-a9724986ba05 ## Quick Start +Use the pre-built Docker image: +```bash +docker run --rm -p 8899:8899 ghcr.io/averygan/reclip:latest +``` + +Open **http://localhost:8899**. + +Or build from source: + ```bash brew install yt-dlp ffmpeg # or apt install ffmpeg && pip install yt-dlp git clone https://github.com/averygan/reclip.git @@ -28,9 +37,7 @@ cd reclip ./reclip.sh ``` -Open **http://localhost:8899**. - -Or with Docker: +Or build your own Docker image: ```bash docker build -t reclip . && docker run -p 8899:8899 reclip