Skip to content

Commit e5a43d0

Browse files
authored
Update main.yml
1 parent 4c38216 commit e5a43d0

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,25 @@ jobs:
2020
# endpoint: https://example.com
2121
# configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.API_TOKEN }}"} }'
2222

23-
- name: Fetch API Data 📦
23+
# - name: Fetch API Data 📦
24+
# uses: JamesIves/fetch-api-data-action@v2
25+
# with:
26+
# # The token endpoint is requested first. This retrieves the access token for the other endpoint.
27+
# token-endpoint: https://uscms-openproject.k8s.accre.vanderbilt.edu/oauth/token
28+
# # The configuration contains secrets held in the Settings/Secrets menu of the repository.
29+
# token-configuration: '{ "method": "POST", "body": {"client_id": "${{ secrets.client_id }}", "client_secret": "${{ secrets.client_secret }}"} }'
30+
# # Once the token endpoint has fetched then this endpoint is requested.
31+
# # endpoint: https://example.com/data
32+
# endpoint: 'http://uscms-openproject.k8s.accre.vanderbilt.edu/api/v3/work_packages?filters=[{"project": {"operator": "=", "values": ["4","5","35","6","8"]}}]&pageSize=1000'
33+
# # The bearer token here is returned from the TOKEN_ENDPOINT call. The returned data looks like so: {data: {access_token: '123'}}, meaning it can be accessed using the triple bracket syntax.
34+
# configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer {{{ data.access_token }}}"} }'
35+
36+
- name: Fetch API Data
2437
uses: JamesIves/fetch-api-data-action@v2
2538
with:
26-
# The token endpoint is requested first. This retrieves the access token for the other endpoint.
27-
token-endpoint: https://uscms-openproject.k8s.accre.vanderbilt.edu/oauth/token
28-
# The configuration contains secrets held in the Settings/Secrets menu of the repository.
29-
token-configuration: '{ "method": "POST", "body": {"client_id": "${{ secrets.client_id }}", "client_secret": "${{ secrets.client_secret }}"} }'
30-
# Once the token endpoint has fetched then this endpoint is requested.
31-
# endpoint: https://example.com/data
3239
endpoint: 'http://uscms-openproject.k8s.accre.vanderbilt.edu/api/v3/work_packages?filters=[{"project": {"operator": "=", "values": ["4","5","35","6","8"]}}]&pageSize=1000'
33-
# The bearer token here is returned from the TOKEN_ENDPOINT call. The returned data looks like so: {data: {access_token: '123'}}, meaning it can be accessed using the triple bracket syntax.
34-
configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer {{{ data.access_token }}}"} }'
35-
40+
configuration: '{ "method": "GET", "headers": {"Authorization": "Basic ${{ secrets.openproj_id }}"} }'
41+
3642
- name: Build and Deploy 🚀
3743
uses: JamesIves/github-pages-deploy-action@v4
3844
with:

0 commit comments

Comments
 (0)