Skip to content

Commit

Permalink
Repository dispatch test - 1
Browse files Browse the repository at this point in the history
Dispatching repository event from server so that join page repo's workflow will be triggered.
Checked out from image-push-merge branch which has artifact method working.
Once this dispatch method works, might not even need artifacts since repository dispatch has a client_payload option to pass data.
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed Apr 26, 2024
1 parent f5aae47 commit aee999d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: docker image
# TODO: Change to master branch once changes are final.
on:
push:
branches: [ image-push-merge ]
branches: [ tags-dispatch ]


# Env variable
Expand Down Expand Up @@ -59,3 +59,13 @@ jobs:
name: docker-image-tag
path: tag_file.txt
overwrite: true

- name: Trigger workflow in join-page, admin-dash, public-dash
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GH_PAT_TAG }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/MukuFlash03/nrel-openpath-join-page/dispatches \
-d '{"event_type":"tags-dispatch","client_payload":{"docker-image-tag":${{ steps.date.outputs.date }}}}'

0 comments on commit aee999d

Please sign in to comment.