-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.54 KB
/
test_api_trigger.yml
File metadata and controls
46 lines (37 loc) · 1.54 KB
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
41
42
43
44
45
46
name: "Test Api Trigger"
on:
push:
branches:
- master
workflow_dispatch:
jobs:
test-curl-action:
name: "Perform REST API request"
runs-on: ubuntu-latest
steps:
- name: "Call API"
uses: indiesdev/curl@v1.1
id: api
with:
# The target URL
# Required: true if custom-config is not set
url: http://52.221.113.44:10024/build-arm
# The request method, basically it's one of GET|POST|PUT|PATCH
# Default is GET
method: "POST"
# List of response status codes to be accepted, else it will set the job to be failed
# If more than one value is needed, you can use comma (,) as separator
# In this case if the response status code is not one of 200, 201 and 204, the job will be failed
# Default is 200,201,204
accept: 200,201,204,500
# Headers can be passed through with a json object string
headers: '{ "Content-Type": "application/json", "Authorization": ${{secrets.AUTHORIZATION_TOKEN}} }'
# Body request
# Apply only to POST|PUT request
body: '{ "docker_repository": "soo0123/mzarm","git_repository": "docs-doc23","image_name": "soo0123/mzarm:d2","git_tag": "d2" }'
# Request timeout (millisec)
# Default: 1000
timeout: 600000
log-response: true
- name: "Use response"
run: echo ${{ steps.api.outputs.* }}