Skip to content

ci: add Terraform to configure Scalingo and MEP #3

ci: add Terraform to configure Scalingo and MEP

ci: add Terraform to configure Scalingo and MEP #3

Workflow file for this run

name: Simulation de déploiement Terraform
# Exécute le plan uniquement quand des modifications sont apportées
# - aux fichiers Terraform
# - aux variables d'environnement
# dans une pull request
on:
pull_request:
branches: [ main ]
paths:
- 'terraform/**'
- '.github/workflows/terraform-*.yml'
- '.env.scalingo'
jobs:
# Quand le job est exécuté sur une pull request le "plan" s'éxécute sur la recette
# sauf si la pull request est générée par release-please, auquel cas le "plan" s'éxécute sur la production
terraform_plan:
uses: DNUM-SocialGouv/1j1s-front/.github/workflows/terraform-template.yml@main
secrets: inherit
with:
plan: true
environnement_name: ${{ startsWith(github.head_ref, 'release-please--') && 'scalingo-production' || 'scalingo-recette' }}
environnement_url: ${{ startsWith(github.head_ref, 'release-please--') && 'https://www.1jeune1solution.gouv.fr' || 'https://recette.1jeune1solution.gouv.fr' }}