Commit Graph

2 Commits

Author SHA1 Message Date
ba4b530635 fix(ci): replace actions/checkout with git clone
Some checks failed
Terraform CI/CD / Validate (push) Failing after 1s
Terraform CI/CD / Plan (push) Has been skipped
Terraform CI/CD / Apply (push) Has been skipped
- Remove actions/checkout@v4 (requires Node.js not in Alpine image)
- Use native git clone instead
- Remove actions/upload-artifact and download-artifact (require Node.js)
- Re-run plan in apply job instead of artifact transfer
- Add workflow file to paths trigger for testing

Refs #3
2025-12-08 09:00:24 +00:00
6036783cd5 feat(ci): Add Terraform CI/CD pipeline (#4)
## Description

Mise en place d'un pipeline CI/CD Gitea Actions pour automatiser le déploiement Terraform.

## Changements

- Ajout du workflow `.gitea/workflows/terraform.yml`
- Utilisation de l'image custom `gitea.arnodo.fr/damien/terraform-ci:latest` (Terraform 1.5.7 + TFLint)
- Exécution dans des containers Docker (pas sur le host)

## Pipeline

| Job | Trigger | Actions |
|-----|---------|---------|
| **validate** | Push + PR | `terraform fmt -check`, `tflint`, `terraform validate` |
| **plan** | Push + PR | `terraform plan` + commentaire automatique sur la PR |
| **apply** | Push sur `dev` uniquement | `terraform apply` (si changements détectés) |

## Secrets configurés

- [x] `AWS_ACCESS_KEY_ID`
- [x] `AWS_SECRET_ACCESS_KEY`
- [x] `PROXMOX_URL`
- [x] `PROXMOX_API_TOKEN`
- [x] `TAILSCALE_AUTH_KEY`
- [x] `GIT_TOKEN`

## Test

Cette PR va déclencher les jobs `validate` et `plan`. Le job `apply` se déclenchera après le merge sur `dev`.

Closes #3

Reviewed-on: #4
2025-12-08 08:52:43 +00:00