diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e0b2f96..3141065 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -363,10 +363,16 @@ ### Branching Strategy: - `main`: Produzione stabile -- `develop`: Sviluppo attivo +- `development`: Sviluppo attivo (pubblica su `latest` tag) - `feature/*`: Nuove feature - `hotfix/*`: Fix urgenti +### CI/CD Pipeline: +- **Branch `main`**: Pubblica immagini Docker con tag `latest` +- **Branch `development`**: Pubblica immagini Docker con tag `latest` (per testing continuo) +- **Branch `staging`**: Pubblica immagini Docker con tag `staging-latest` +- **Ogni commit**: Crea tag con SHA e timestamp per tracciabilità + ### Commit Messages: - Formato: `[Tipo] Descrizione breve` - Tipi: `[Feature]`, `[Fix]`, `[Refactor]`, `[Docs]`, `[Test]` diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index f3f33db..55b4c5a 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -50,6 +50,7 @@ jobs: tags: | # Tag based on branch type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/development' }} type=raw,value=dev-latest,enable=${{ github.ref == 'refs/heads/dev' }} type=raw,value=staging-latest,enable=${{ github.ref == 'refs/heads/staging' }} # Tag with commit sha @@ -107,6 +108,7 @@ jobs: tags: | # Tag based on branch with windows suffix type=raw,value=latest-windows,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=latest-windows,enable=${{ github.ref == 'refs/heads/development' }} type=raw,value=dev-latest-windows,enable=${{ github.ref == 'refs/heads/dev' }} type=raw,value=staging-latest-windows,enable=${{ github.ref == 'refs/heads/staging' }} # Tag with commit sha @@ -165,6 +167,14 @@ jobs: ${IMAGE_LOWER}:latest \ ${IMAGE_LOWER}:latest-windows + - name: Create and push manifest for development branch + if: github.ref == 'refs/heads/development' + run: | + IMAGE_LOWER=$(echo "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" | tr '[:upper:]' '[:lower:]') + docker buildx imagetools create -t ${IMAGE_LOWER}:latest \ + ${IMAGE_LOWER}:latest \ + ${IMAGE_LOWER}:latest-windows + - name: Create and push manifest for dev branch if: github.ref == 'refs/heads/dev' run: | diff --git a/README.md b/README.md index 6a8807b..3c8d7a2 100644 --- a/README.md +++ b/README.md @@ -157,11 +157,13 @@ docker build -t data-coupler:local-windows -f Dockerfile.windows . ``` **Immagini Disponibili:** -- **Linux**: `ghcr.io/alessiodalsi/data-coupler:latest` +- **Linux/Multi-platform**: `ghcr.io/alessiodalsi/data-coupler:latest` - **Windows**: `ghcr.io/alessiodalsi/data-coupler:latest-windows` - **Dev**: `ghcr.io/alessiodalsi/data-coupler:dev-latest` - **Staging**: `ghcr.io/alessiodalsi/data-coupler:staging-latest` +**Note**: Il tag `latest` viene automaticamente aggiornato sia dal branch `main` che dal branch `development` per garantire che le ultime funzionalità siano sempre disponibili. + 📚 **Documentazione Docker Completa**: Vedi [DOCKER_DEPLOYMENT.md](DOCKER_DEPLOYMENT.md) e [GITHUB_ACTIONS_SETUP.md](GITHUB_ACTIONS_SETUP.md) ## Caratteristiche di Sicurezza