Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

Add Docker image #130

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,30 @@ jobs:
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_api_token }}

build-docker-image:
runs-on: ubuntu-latest
needs: build-and-publish
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Prepare image name
run: |
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
echo IMAGE_TAG=$(echo ${{ github.ref_name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
-
name: Build and push image
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}"
push: true
tags: "ghcr.io/${{env.IMAGE_REPOSITORY}}:${{env.IMAGE_TAG}},ghcr.io/${{env.IMAGE_REPOSITORY}}:latest"
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.9-slim-bullseye

RUN apt update && apt install tor -y \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install tflite-runtime ulozto-downloader

ENTRYPOINT ["ulozto-downloader", "--output", "/downloads/"]