From 5fc153dcf361cb9af58d1375d4e85aa70a85a485 Mon Sep 17 00:00:00 2001 From: Eun0us Date: Mon, 19 Jan 2026 12:15:46 +0100 Subject: [PATCH] =?UTF-8?q?=CE=B5=20-=20Add=20WorkFlow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/discord-commits.yml | 31 +++++++++++++++++++++++++++ README.md | 4 +--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/discord-commits.yml diff --git a/.github/workflows/discord-commits.yml b/.github/workflows/discord-commits.yml new file mode 100644 index 0000000..2b6a045 --- /dev/null +++ b/.github/workflows/discord-commits.yml @@ -0,0 +1,31 @@ +name: Discord - Commits + +on: + push: + branches: + - "**" + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Send Discord notification + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + run: | + COMMITS_JSON='${{ toJson(github.event.commits) }}' + COMMITS=$(echo "$COMMITS_JSON" | jq -r '.[:10][] | "• [\(.id[0:7])] \(.message) — \(.author.name)"' || true) + + REPO="${{ github.repository }}" + BRANCH="${{ github.ref_name }}" + COMPARE_URL="${{ github.event.compare }}" + ACTOR="${{ github.actor }}" + + if [ -z "$COMMITS" ]; then + COMMITS="• (Pas de détails de commits disponibles)" + fi + + CONTENT="**📌 Push sur \`$REPO\`** (branche: \`$BRANCH\`) par **$ACTOR**\n$COMMITS\n\n🔎 $COMPARE_URL" + + jq -n --arg content "$CONTENT" '{content: $content}' \ + | curl -s -H "Content-Type: application/json" -X POST -d @- "$DISCORD_WEBHOOK" diff --git a/README.md b/README.md index 0b28049..061266e 100644 --- a/README.md +++ b/README.md @@ -137,9 +137,7 @@ Espilon transforme des microcontrôleurs ESP32 abordables à **~5€** en agents ## Modules Disponibles -> **Note importante** : Les modules sont **mutuellement exclusifs**. Vous devez choisir **un seul module** lors de la configuration via menuconfig. - -### System Module (Built-in, toujours actif) +### System Module (Built-in, toujours actif désactivable dans les src) Commandes système de base :