diff --git a/.github/workflows/MerginMapsHook.yml b/.github/workflows/MerginMapsHook.yml index 372a3c4..0846467 100644 --- a/.github/workflows/MerginMapsHook.yml +++ b/.github/workflows/MerginMapsHook.yml @@ -6,10 +6,12 @@ on: - main paths: - 'Outputs/SHP/QGis_GPKG_Files/**' + repository_dispatch: + types: + - mergin-sync workflow_dispatch: permissions: contents: read - jobs: notify-mergin: name: Notifier n8n diff --git a/.github/workflows/ScriptPython.yml b/.github/workflows/ScriptPython.yml index da16dbe..3402665 100644 --- a/.github/workflows/ScriptPython.yml +++ b/.github/workflows/ScriptPython.yml @@ -522,3 +522,15 @@ jobs: commit_user_name: "github-actions[bot]" commit_user_email: "41898282+github-actions[bot]@users.noreply.github.com" commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" + + # ============================================================ + # 17. MerginMaps Hook + # ============================================================ + - name: Trigger MerginMapsHook + if: steps.changed.outputs.shp == 'true' || steps.changed.outputs.manual == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + run: | + gh api "repos/${GH_REPO}/dispatches" \ + -f event_type=mergin-sync