Skip to content

Commit

Permalink
test run
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Boyer committed Nov 28, 2023
1 parent c4e70f7 commit abd5bfd
Showing 1 changed file with 44 additions and 18 deletions.
62 changes: 44 additions & 18 deletions .github/workflows/request-grav.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Demander un site web GRAV
on:
push:
branches:
- feature/grav-automation
workflow_dispatch:
inputs:
domaine:
Expand All @@ -15,46 +18,69 @@ on:
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=${{inputs.nom_club}}
repo_name=grav-${{inputs.nom_club}}
repo_url=https://github.com/ClubCedille/grav-${{inputs.nom_club}}.git
namespace=grav-${{inputs.nom_club}}
hostname=${{inputs.domaine}}
requester=${{github.event.sender.name}}
# 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 kustomize
uses: cuchi/[email protected]
with:
template: bases/grav/prod-templates/kustomization.yaml.jinja2
output_file: apps/${{inputs.nom_club}}/grav/prod/kustomization.yaml
output_file: apps/${{env.nom_club}}/grav/prod/kustomization.yaml
strict: true
variables: ${{env.j2_vars}}
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/${{inputs.nom_club}}/grav/prod/vault-patch.yaml
output_file: apps/${{env.nom_club}}/grav/prod/vault-patch.yaml
strict: true
variables: ${{env.j2_vars}}
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-${{inputs.nom_club}}.tf
output_file: terraform/github/apps-repos/grav-${{env.nom_club}}.tf
strict: true
variables: ${{env.j2_vars}}
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 ${{inputs.nom_club}}
title: Create a GRAV website for ${{env.nom_club}}
body: |
Nom du club: ${{inputs.nom_club}}
Domaine: ${{inputs.domaine}}
Contexte: ${{inputs.contexte}}
Nom du club: ${{env.nom_club}}
Domaine: ${{env.domaine}}
Contexte: ${{env.contexte}}

0 comments on commit abd5bfd

Please sign in to comment.