Skip to content

Commit

Permalink
trigger downstream
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinkrustev committed Oct 18, 2024
1 parent e5b2940 commit a8dadf0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,20 @@ jobs:
- run:
name: Publish Helm Charts
command: .circleci/publish_helm_charts.sh
- run:
name: Trigger downstream workflows
# DOWNSTREAM_IMAGE_ variables contain downstream repository:token pairs
command: |
for var in $(compgen -A variable | grep "^DOWNSTREAM_IMAGE_"); do
REPO_NAME=$(echo ${!var} | cut -d: -f1)
echo "Triggering downstream workflow for $REPO_NAME"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $(echo ${!var} | cut -d: -f2)" \
https://api.github.com/repos/$REPO_NAME/actions/workflows/docker-image.yaml/dispatches \
-d '{"ref":"main","inputs":{"upstream":"'$CIRCLE_BUILD_URL'","chart":"mojaloop","tag":"'$GIT_RELEASE_TAG'"}}'
done
- slack/notify:
event: pass
template: SLACK_TEMP_RELEASE_SUCCESS
Expand Down

0 comments on commit a8dadf0

Please sign in to comment.