-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (25 loc) · 1007 Bytes
/
pubhub.yml
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
name: pubhub-notification
# Run this workflow every time a new commit pushed to your repository
on: push
jobs:
notification:
name: notification
runs-on: ubuntu-latest
outputs:
response: ${{steps.CloudSSO.response}}
steps:
- name: echo
run: echo "Starting https request"
- name: cloudsso
uses: fjogeleit/[email protected]
id: ciscosso
with:
url: 'https://cloudsso.cisco.com/as/token.oauth2?grant_type=client_credentials&client_id=${{secrets.client_id}}&client_secret=${{secrets.client_secret}}'
method: POST
- name : PubHub API
uses: fjogeleit/[email protected]
with:
url: 'https://api.cisco.com/api/v1.0/projects/sync/${{secrets.project_id}}/'
timeout: 60000
customHeaders: '{"X-Authorization":"Token ${{secrets.pubhub_token}}", "Authorization" : "Bearer ${{fromJson(steps.ciscosso.outputs.response).access_token}}"}'
method: GET