feat : #14 partage de profil
This commit is contained in:
31
.gitea/workflows/trigger-deploy.yaml
Normal file
31
.gitea/workflows/trigger-deploy.yaml
Normal 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\"}}"
|
||||
Reference in New Issue
Block a user