From 398cbe799620906227aa7f6d5f99a0b9a4e15b33 Mon Sep 17 00:00:00 2001 From: Guite Date: Mon, 9 Dec 2019 07:32:23 +0100 Subject: [PATCH] trigger modules regenerations after standalone generator has been deployed --- .github/scripts/regenerateModules.sh | 23 +++++++++++++++++++++++ .github/workflows/build-component.yml | 4 ++++ 2 files changed, 27 insertions(+) create mode 100755 .github/scripts/regenerateModules.sh diff --git a/.github/scripts/regenerateModules.sh b/.github/scripts/regenerateModules.sh new file mode 100755 index 000000000..583c5a35e --- /dev/null +++ b/.github/scripts/regenerateModules.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# list projects +PROJECTS=( + "Guite/test-actions" + "Guite/Awards" + "zikula-modules/Content" + "zikula-modules/MultiHook" + "zikula-modules/Multisites" + "zikula-modules/News" +) + +# loop through projects +for PROJECT in "${PROJECTS[@]}" +do + echo "Trigger ${PROJECT}" + curl POST -H "Authorization: token ${DISPATCH_TOKEN}" \ + -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Content-Type: application/json" \ + "https://api.github.com/repos/${PROJECT}/dispatches" \ + --data '{"event_type": "generator-updated"}' \ + --silent +done diff --git a/.github/workflows/build-component.yml b/.github/workflows/build-component.yml index 551e0bbd4..ee2d53aa9 100644 --- a/.github/workflows/build-component.yml +++ b/.github/workflows/build-component.yml @@ -69,3 +69,7 @@ jobs: token: ${{ secrets.DISPATCH_TOKEN }} repository: Guite/MostProduct event-type: upstream-build + - name: Regenerate modules + run: ./.github/scripts/regenerateModules.sh + env: + DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }}