-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (35 loc) · 1.24 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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/$repo_owner/$repo_name/dispatches \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"venue\": \"$venue\", \"unit\": false, \"integration\": true}}"