Skip to content

create folder structure #3

create folder structure

create folder structure #3

Workflow file for this run

name: Demander un site web GRAV
on:
push:
branches:
- feature/grav-automation
workflow_dispatch:
inputs:
domaine:
type: string
required: true
description: Domaine à utiliser (eg cedille.etsmtl.ca)
nom_club:
type: string
required: true
description: Nom du club. Pas de caractères spéciaux ou d'espaces outre - et _
contexte:
type: string
required: false
description: Contexte sur la demande
env:
domaine: grav.omni.cedille.club
nom_club: demo
contexte: Hello World
jobs:
create_pr:
runs-on: ubuntu-latest
# env:
# j2_vars: |
# deployment_name=${{env.nom_club}}
# repo_name=grav-${{env.nom_club}}
# repo_url=https://github.com/ClubCedille/grav-${{env.nom_club}}.git
# namespace=grav-${{env.nom_club}}
# hostname=${{env.domaine}}
# requester=${{github.event.sender.name}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create folders
run: mkdir -p apps/${{env.nom_club}}/grav/prod
- name: Create kustomize
uses: cuchi/[email protected]
with:
template: bases/grav/prod-templates/kustomization.yaml.jinja2
output_file: apps/${{env.nom_club}}/grav/prod/kustomization.yaml
strict: true
variables: |
deployment_name=${{env.nom_club}}
repo_name=grav-${{env.nom_club}}
repo_url=https://github.com/ClubCedille/grav-${{env.nom_club}}.git
namespace=grav-${{env.nom_club}}
hostname=${{env.domaine}}
requester=${{github.event.sender.name}}
- name: Create vault-patch
uses: cuchi/[email protected]
with:
template: bases/grav/prod-templates/vault-patch.yaml.jinja2
output_file: apps/${{env.nom_club}}/grav/prod/vault-patch.yaml
strict: true
variables: |
deployment_name=${{env.nom_club}}
repo_name=grav-${{env.nom_club}}
repo_url=https://github.com/ClubCedille/grav-${{env.nom_club}}.git
namespace=grav-${{env.nom_club}}
hostname=${{env.domaine}}
requester=${{github.event.sender.name}}
- name: Create terraform repo
uses: cuchi/[email protected]
with:
template: terraform/github/apps-repos/grav.tf.jinja2
output_file: terraform/github/apps-repos/grav-${{env.nom_club}}.tf
strict: true
variables: |
deployment_name=${{env.nom_club}}
repo_name=grav-${{env.nom_club}}
repo_url=https://github.com/ClubCedille/grav-${{env.nom_club}}.git
namespace=grav-${{env.nom_club}}
hostname=${{env.domaine}}
requester=${{github.event.sender.name}}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: Create a GRAV website for ${{env.nom_club}}
body: |
Nom du club: ${{env.nom_club}}
Domaine: ${{env.domaine}}
Contexte: ${{env.contexte}}