Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Add remote-dispatch to deploy workflow (#10)
Browse files Browse the repository at this point in the history
Add step to deploy workflow to trigger remote dispatch in InnerEye-Gateway
  • Loading branch information
JonathanTripp authored May 17, 2021
1 parent 4f5b1ae commit fd6aee8
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

on:
push:
branches: main
branches: [ main ]

name: Deploy to DEV

Expand All @@ -26,4 +26,23 @@ jobs:
with:
azcliversion: 2.20.0
inlineScript: |
az webapp up --name innereyeinferencedev --subscription "InnerEye Dev" -g InnerEyeInference
az webapp up --name innereyeinferencedev --subscription "InnerEye Dev" -g InnerEyeInference
#
# Create a repository dispatch event.
#
# https://docs.github.com/en/rest/reference/repos#create-a-repository-dispatch-event
# This requires a github user with a personal access token:
# https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
# and ensuring that the personal access token is authorized to access the repo https://github.com/microsoft/InnerEye-Gateway/
# https://docs.github.com/en/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on
# Store the user in the secret DISPATCH_GATEWAY_USER and the access token in the secret DISPATCH_GATEWAY_TOKEN.
#
- name: Send remote-dispatch to InnerEye-Gateway
run: |
curl \
--request POST \
--header "Accept: application/vnd.github.v3+json" \
--user ${{ secrets.DISPATCH_GATEWAY_USER }}:${{ secrets.DISPATCH_GATEWAY_TOKEN }} \
--data '{"event_type": "deploy_to_dev"}' \
https://api.github.com/repos/microsoft/InnerEye-Gateway/dispatches

0 comments on commit fd6aee8

Please sign in to comment.