Merge pull request #75 from mateof/release/3.5.1 #50
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Image CI (Release) | |
| # Triggers: | |
| # - Push tags: server-v* OR v* (but NOT app-v*) | |
| # Docker is only built for Server releases | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| - 'server-v*.*.*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # Skip if it's an app-only release | |
| if: ${{ !startsWith(github.ref_name, 'app-v') }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| TAG=${GITHUB_REF_NAME} | |
| # Remove 'server-v' or 'v' prefix | |
| VERSION=${TAG#server-v} | |
| VERSION=${VERSION#v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $VERSION from tag: $TAG" | |
| - name: 'Login to GitHub Container Registry' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{github.actor}} | |
| password: ${{secrets.GHCR}} | |
| - name: Build and Push Full Image (with FFmpeg) | |
| run: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| echo "Building full image with FFmpeg support..." | |
| docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \ | |
| --build-arg VERSION=$VERSION \ | |
| --build-arg INCLUDE_FFMPEG=true \ | |
| --tag ghcr.io/mateof/telegramfilemanager:${{github.ref_name}} \ | |
| --tag ghcr.io/mateof/telegramfilemanager:latest | |
| docker push ghcr.io/mateof/telegramfilemanager:${{github.ref_name}} | |
| docker push ghcr.io/mateof/telegramfilemanager:latest | |
| - name: Build and Push Lite Image (without FFmpeg) | |
| run: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| echo "Building lite image without FFmpeg..." | |
| docker build ./TelegramDownloader -f ./TelegramDownloader/Dockerfile \ | |
| --build-arg VERSION=$VERSION \ | |
| --build-arg INCLUDE_FFMPEG=false \ | |
| --tag ghcr.io/mateof/telegramfilemanager:${{github.ref_name}}-lite \ | |
| --tag ghcr.io/mateof/telegramfilemanager:latest-lite | |
| docker push ghcr.io/mateof/telegramfilemanager:${{github.ref_name}}-lite | |
| docker push ghcr.io/mateof/telegramfilemanager:latest-lite |