Skip to content

Commit

Permalink
trigger modules regenerations after standalone generator has been dep…
Browse files Browse the repository at this point in the history
…loyed
  • Loading branch information
Guite committed Dec 9, 2019
1 parent a7ec347 commit 398cbe7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/scripts/regenerateModules.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions .github/workflows/build-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 398cbe7

Please sign in to comment.