зеркало из
https://github.com/M82-project/DIMA.git
synced 2025-10-29 13:06:08 +02:00
56 строки
1.8 KiB
YAML
56 строки
1.8 KiB
YAML
# Nom du workflow
|
|
name: Générer le Zip et créer une PR sur le site web
|
|
|
|
# --- DÉCLENCHEUR ---
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
types: [opened, synchronize]
|
|
|
|
# --- TÂCHES (JOBS) ---
|
|
jobs:
|
|
build-and-create-pr:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
# ... (les étapes 1 à 4 ne changent pas) ...
|
|
|
|
- name: 1. Récupération du code de DIMA
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
|
|
- name: 2. Compression du répertoire du plugin
|
|
run: |
|
|
cd "plugin/plugin_chrome/releases/"
|
|
zip -r Plugin-dima.zip Plugin-dima
|
|
|
|
- name: 3. Récupération du dépôt M82-SiteWeb
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: M82-project/M82-SiteWeb
|
|
token: ${{ secrets.CROSS_REPO_PAT }}
|
|
path: M82-SiteWeb
|
|
|
|
- name: 4. Copie du fichier .zip
|
|
run: |
|
|
mv plugin/plugin_chrome/releases/Plugin-dima.zip M82-SiteWeb/static/files/
|
|
|
|
# Étape 5 : Crée une Pull Request dans M82-SiteWeb
|
|
- name: 5. Création de la Pull Request
|
|
uses: peter-evans/create-pull-request@v6
|
|
with:
|
|
path: ./M82-SiteWeb
|
|
token: ${{ secrets.CROSS_REPO_PAT }}
|
|
# --- MODIFICATION ICI ---
|
|
# On crée un nom de branche unique pour chaque exécution
|
|
branch: "update/plugin-dima-${{ github.run_id }}"
|
|
title: "🤖 Mise à jour automatique du Plugin-dima.zip"
|
|
body: |
|
|
Mise à jour du fichier `Plugin-dima.zip`.
|
|
Cette modification a été déclenchée automatiquement par un workflow du dépôt `DIMA`.
|
|
commit-message: "feat: Mise à jour du Plugin-dima.zip"
|
|
base: master |