Swodlr Deployment #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Swodlr Deployment | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
venue: | |
type: choice | |
description: Venue to deploy to | |
options: | |
- SIT | |
- UAT | |
jobs: | |
trigger: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: getsentry/action-github-app-token@v2 | |
name: my-app-install token | |
id: podaac-cicd | |
with: | |
app_id: ${{ secrets.CICD_APP_ID }} | |
private_key: ${{ secrets.CICD_APP_PRIVATE_KEY }} | |
- name: Trigger Workflow in Another Repository | |
run: | | |
# Set the required variables | |
repo_owner="podaac" | |
repo_name="swodler-user-notify" | |
event_type="trigger-workflow" | |
venue="${{ github.event.inputs.venue }}" | |
# curl -L \ | |
# -X POST \ | |
# -H "Accept: application/vnd.github+json" \ | |
# -H "Authorization: Bearer ${{ steps.podaac-cicd.outputs.token }}" \ | |
# -H "X-GitHub-Api-Version: 2022-11-28" \ | |
# https://api.github.com/repos/podaac/swodlr-user-notify/dispatches \ | |
# -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"venue\": \"$venue\", \"unit\": false, \"integration\": true}}" | |
curl \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ steps.podaac-cicd.outputs.token }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/podaac/swodlr-uer-notify/actions/workflows/build.yaml/dispatches \ | |
-d '{"ref":"topic-branch","inputs":{"name":"Mona the Octocat","home":"San Francisco, CA"}}' |