[CI/CD] Aggiornamento GitHub Actions per branch development con tag latest
- Aggiunto supporto per tag 'latest' anche dal branch development - Aggiunto manifest multi-platform per development branch - Aggiornata documentazione README.md e copilot-instructions.md - Il tag latest ora viene pubblicato da main E development per garantire accesso alle ultime funzionalità
This commit is contained in:
@@ -363,10 +363,16 @@
|
|||||||
|
|
||||||
### Branching Strategy:
|
### Branching Strategy:
|
||||||
- `main`: Produzione stabile
|
- `main`: Produzione stabile
|
||||||
- `develop`: Sviluppo attivo
|
- `development`: Sviluppo attivo (pubblica su `latest` tag)
|
||||||
- `feature/*`: Nuove feature
|
- `feature/*`: Nuove feature
|
||||||
- `hotfix/*`: Fix urgenti
|
- `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:
|
### Commit Messages:
|
||||||
- Formato: `[Tipo] Descrizione breve`
|
- Formato: `[Tipo] Descrizione breve`
|
||||||
- Tipi: `[Feature]`, `[Fix]`, `[Refactor]`, `[Docs]`, `[Test]`
|
- Tipi: `[Feature]`, `[Fix]`, `[Refactor]`, `[Docs]`, `[Test]`
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
# Tag based on branch
|
# Tag based on branch
|
||||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
|
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=dev-latest,enable=${{ github.ref == 'refs/heads/dev' }}
|
||||||
type=raw,value=staging-latest,enable=${{ github.ref == 'refs/heads/staging' }}
|
type=raw,value=staging-latest,enable=${{ github.ref == 'refs/heads/staging' }}
|
||||||
# Tag with commit sha
|
# Tag with commit sha
|
||||||
@@ -107,6 +108,7 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
# Tag based on branch with windows suffix
|
# 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/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=dev-latest-windows,enable=${{ github.ref == 'refs/heads/dev' }}
|
||||||
type=raw,value=staging-latest-windows,enable=${{ github.ref == 'refs/heads/staging' }}
|
type=raw,value=staging-latest-windows,enable=${{ github.ref == 'refs/heads/staging' }}
|
||||||
# Tag with commit sha
|
# Tag with commit sha
|
||||||
@@ -165,6 +167,14 @@ jobs:
|
|||||||
${IMAGE_LOWER}:latest \
|
${IMAGE_LOWER}:latest \
|
||||||
${IMAGE_LOWER}:latest-windows
|
${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
|
- name: Create and push manifest for dev branch
|
||||||
if: github.ref == 'refs/heads/dev'
|
if: github.ref == 'refs/heads/dev'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -157,11 +157,13 @@ docker build -t data-coupler:local-windows -f Dockerfile.windows .
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Immagini Disponibili:**
|
**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`
|
- **Windows**: `ghcr.io/alessiodalsi/data-coupler:latest-windows`
|
||||||
- **Dev**: `ghcr.io/alessiodalsi/data-coupler:dev-latest`
|
- **Dev**: `ghcr.io/alessiodalsi/data-coupler:dev-latest`
|
||||||
- **Staging**: `ghcr.io/alessiodalsi/data-coupler:staging-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)
|
📚 **Documentazione Docker Completa**: Vedi [DOCKER_DEPLOYMENT.md](DOCKER_DEPLOYMENT.md) e [GITHUB_ACTIONS_SETUP.md](GITHUB_ACTIONS_SETUP.md)
|
||||||
|
|
||||||
## Caratteristiche di Sicurezza
|
## Caratteristiche di Sicurezza
|
||||||
|
|||||||
Reference in New Issue
Block a user