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:
@@ -1,4 +1,5 @@
|
|||||||
.gitea/
|
.gitea/
|
||||||
|
.github/
|
||||||
.venv/
|
.venv/
|
||||||
./bin/
|
./bin/
|
||||||
# Python bytecode
|
# Python bytecode
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Build Release Packages
|
name: Build Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|||||||
@@ -118,13 +118,52 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- 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
|
- name: Download Linux Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux-release
|
name: linux-release
|
||||||
- name: Build and Push Docker (Optional)
|
path: dist/linux-docker
|
||||||
|
|
||||||
|
- name: Prepare Docker build context
|
||||||
run: |
|
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:
|
release:
|
||||||
needs: [build, docker]
|
needs: [build, docker]
|
||||||
@@ -133,6 +172,20 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v4
|
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
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
+5
-5
@@ -4,13 +4,13 @@ WORKDIR /app
|
|||||||
|
|
||||||
# Copy application code (package) and bootstrap
|
# Copy application code (package) and bootstrap
|
||||||
COPY yt-playlist-main.py /app/
|
COPY yt-playlist-main.py /app/
|
||||||
COPY ytplaylist/ /app/ytplaylist/
|
COPY ytpld/ /app/ytpld/
|
||||||
COPY config/ /app/config/
|
COPY config/ /app/config/
|
||||||
|
|
||||||
# Copy helper binaries into a bin/ folder inside the image
|
# Copy helper binaries from the build context (which includes extracted artifacts)
|
||||||
COPY ./bin/ffmpeg /app/bin/ffmpeg
|
COPY bin/ffmpeg /app/bin/ffmpeg
|
||||||
COPY ./bin/yt-dlp /app/bin/yt-dlp
|
COPY bin/yt-dlp /app/bin/yt-dlp
|
||||||
COPY ./bin/aria2c /app/bin/aria2c
|
COPY bin/aria2c /app/bin/aria2c
|
||||||
|
|
||||||
# Copy entrypoint that maps environment variables to CLI flags
|
# Copy entrypoint that maps environment variables to CLI flags
|
||||||
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# YouTube Playlist Downloader
|
# YouTube Playlist Downloader
|
||||||
|
|
||||||
[](https://github.com/darkzoul5/YoutubePlaylistDownloader/actions/workflows/release.yml)
|
[](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.
|
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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user