1
0
mirror of https://github.com/darkzoul5/YoutubePlaylistSync.git synced 2026-07-04 21:04:01 +03:00

Update Docker and workflow configurations for improved build process

This commit is contained in:
2026-03-18 18:10:25 +02:00
parent 7b6e0c094e
commit 94db632043
5 changed files with 63 additions and 9 deletions
+1
View File
@@ -1,4 +1,5 @@
.gitea/
.github/
.venv/
./bin/
# Python bytecode
+1 -1
View File
@@ -1,4 +1,4 @@
name: Build Release Packages
name: Build Release
on:
workflow_dispatch:
+55 -2
View File
@@ -118,13 +118,52 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Get version
id: version
shell: bash
run: |
TAG="${{ github.event.inputs.tag || inputs.tag }}"
VERSION="${TAG#v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Download Linux Artifact
uses: actions/download-artifact@v4
with:
name: linux-release
- name: Build and Push Docker (Optional)
path: dist/linux-docker
- name: Prepare Docker build context
run: |
echo "Placeholder for Docker build if needed"
cd dist/linux-docker
tar -xzf yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz
cp ../../Dockerfile .
cp ../../docker-entrypoint.sh .
# Ensure ytpld package is present
if [ ! -d "ytpld" ]; then cp -r ../../ytpld . ; fi
- name: Set docker image names
run: |
VERSION="${{ steps.version.outputs.version }}"
echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/ytpld:${VERSION}" >> $GITHUB_ENV
echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/ytpld:latest" >> $GITHUB_ENV
- name: Build Docker image
run: |
docker build . -t $RELEASE_IMAGE -t $LATEST_IMAGE
working-directory: dist/linux-docker
- name: Save Docker images
run: |
docker save -o docker-image.tar $RELEASE_IMAGE
docker save -o docker-image-latest.tar $LATEST_IMAGE
working-directory: dist/linux-docker
- name: Upload Docker artifacts
uses: actions/upload-artifact@v4
with:
name: docker-images
path: dist/linux-docker/docker-image*.tar
release:
needs: [build, docker]
@@ -133,6 +172,20 @@ jobs:
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker images
run: |
docker load -i docker-images/docker-image.tar
docker push ghcr.io/${GITHUB_ACTOR}/ytpld:${{ steps.version.outputs.version }}
docker load -i docker-images/docker-image-latest.tar
docker push ghcr.io/${GITHUB_ACTOR}/ytpld:latest
- name: Create Release
uses: softprops/action-gh-release@v2
with:
+5 -5
View File
@@ -4,13 +4,13 @@ WORKDIR /app
# Copy application code (package) and bootstrap
COPY yt-playlist-main.py /app/
COPY ytplaylist/ /app/ytplaylist/
COPY ytpld/ /app/ytpld/
COPY config/ /app/config/
# Copy helper binaries into a bin/ folder inside the image
COPY ./bin/ffmpeg /app/bin/ffmpeg
COPY ./bin/yt-dlp /app/bin/yt-dlp
COPY ./bin/aria2c /app/bin/aria2c
# Copy helper binaries from the build context (which includes extracted artifacts)
COPY bin/ffmpeg /app/bin/ffmpeg
COPY bin/yt-dlp /app/bin/yt-dlp
COPY bin/aria2c /app/bin/aria2c
# Copy entrypoint that maps environment variables to CLI flags
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
+1 -1
View File
@@ -1,6 +1,6 @@
# YouTube Playlist Downloader
[![Build Release Packages](https://github.com/darkzoul5/YoutubePlaylistDownloader/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/darkzoul5/YoutubePlaylistDownloader/actions/workflows/release.yml)
[![Build Release](https://github.com/darkzoul5/YoutubePlaylistDownloader/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/darkzoul5/YoutubePlaylistDownloader/actions/workflows/build.yml)
A cross-platform tool for downloading entire YouTube playlists as MP3 or MP4 files, using [yt-dlp](https://github.com/yt-dlp/yt-dlp), [ffmpeg](https://ffmpeg.org/), and [aria2c](https://github.com/aria2/aria2). Includes Gitea CI/CD workflow for packaging and releasing Windows and Linux binaries.