Skip to content

Commit

Permalink
change dockerfile and add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
by-justin committed Jul 8, 2024
1 parent c75493b commit 33a5233
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Push Docker Image

on:
push:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/my-image:latest
platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ RUN \
COPY ./main.py /app
COPY cctv_patched.py /app/yt_dlp/extractor/cctv.py

CMD python3 /app/main.py
ENTRYPOINT ["python3","/app/main.py"]

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ https://tv.cctv.com/lm/gzsbqlx/index.shtml
```
git clone https://github.com/by-justin/cctvdownloader
docker build -t cctvdownloader .
docker run --rm -v ./data:/data cctvdownloader python3 /app/main.py --help
docker run --rm -v ./data:/data cctvdownloader --help
```

因为某些奇怪的原因, 国内访问会 403,要代理 `hls.cntv.cdn20.com`。在 clash 里面添加
Expand Down

0 comments on commit 33a5233

Please sign in to comment.