feat : #14 partage de profil

This commit is contained in:
styve Lioumba
2025-12-04 12:42:06 +01:00
parent 6afb13b2e9
commit 65ecc516c4
37 changed files with 309 additions and 74 deletions

View File

@@ -0,0 +1,31 @@
name: Trigger Deploy Repo
run-name: Trigger deploy
on:
push:
tags:
- '*' # Se déclenche sur n'importe quel tag
jobs:
dispatch:
runs-on: ubuntu-latest
env:
# ------- À ADAPTER -------
CODE_REF: ${{ gitea.ref }} # branche/tag/sha à récupérer
GITEA_SERVER_URL: https://git.prod.k3s.technostrea.fr # URL du serveur Gitea
# --------------------------
steps:
- name: Dispatch Signal to ttp-deploy
run: |
# Récupération de la version sans le "refs/tags/"
VERSION=${{ env.CODE_REF }}
echo "Déclenchement du déploiement pour la version $VERSION sur l'instance ${{ env.GITEA_SERVER_URL }}"
# Appel API Gitea.
# Notez la structure de l'URL : /api/v1/repos/{owner}/{repo}/dispatches
curl -X POST "${{ env.GITEA_SERVER_URL }}/api/v1/repos/technostrea/trouvetonprofile-deployment/dispatches" \
-H "Authorization: token ${{ secrets.ROBOT_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"event_type\": \"build-release\", \"client_payload\": {\"version\": \"$VERSION\"}}"