Repository navigation
Merge pull request #254 from oviron/feat/full-message-records #58
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 Build & Compose Validation | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| docker_build: | |
| name: Build Docker Image (Multistage) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU (for multi-platform builds) | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build production target | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| target: production | |
| tags: telegram-mcp:latest,telegram-mcp:ci | |
| load: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and test development target | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| target: development | |
| tags: telegram-mcp:dev | |
| load: true | |
| cache-from: type=gha | |
| docker_compose: | |
| name: Build & Validate Docker Compose | |
| runs-on: ubuntu-latest | |
| needs: docker_build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Create dummy .env file | |
| run: | | |
| echo "TELEGRAM_API_ID=DUMMY_ID" > .env | |
| echo "TELEGRAM_API_HASH=DUMMY_HASH" >> .env | |
| echo "TELEGRAM_SESSION_STRING=DUMMY_SESSION" >> .env | |
| - name: Validate Compose file syntax | |
| run: docker compose config | |
| - name: Build Compose services | |
| run: docker compose build |