Merge remote-tracking branch 'origin/main' into develop #252
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 (Dev) | |
| on: | |
| push: | |
| branches: [ "develop" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Generate version | |
| id: version | |
| run: | | |
| # Generate dev version: 0.0.0-dev.YYYYMMDD.HHMMSS.shortsha | |
| DATE_VERSION=$(date +%Y%m%d.%H%M%S) | |
| SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7) | |
| VERSION="0.0.0-dev.${DATE_VERSION}.${SHORT_SHA}" | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Generated version: $VERSION" | |
| - 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:dev_$VERSION \ | |
| --tag ghcr.io/mateof/telegramfilemanager:dev_latest | |
| docker push ghcr.io/mateof/telegramfilemanager:dev_$VERSION | |
| docker push ghcr.io/mateof/telegramfilemanager:dev_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:dev_$VERSION-lite \ | |
| --tag ghcr.io/mateof/telegramfilemanager:dev_latest-lite | |
| docker push ghcr.io/mateof/telegramfilemanager:dev_$VERSION-lite | |
| docker push ghcr.io/mateof/telegramfilemanager:dev_latest-lite |