-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
46 lines (44 loc) · 1.18 KB
/
action.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "sitkoru/teamcity-deployment-action"
description: "Action to manage Teamcity Deployments"
branding:
icon: "package"
color: "blue"
inputs:
version:
description: "Service version"
required: true
token:
description: "Teamcity token"
required: true
url:
description: "Teamcity root url"
required: true
ids:
description: "Teamcity build ids"
required: true
runs:
using: "composite"
steps:
- name: Trigger deployment
shell: bash
run: |
export IFS=";"
ids='${{ inputs.ids }}'
for id in $ids; do
curl --location --request POST '${{ inputs.url }}/app/rest/buildQueue' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ${{ inputs.token }}' \
--data-raw "{
\"branchName\": \"${{ inputs.version }}\",
\"buildType\": {
\"id\": \"$id\"
},
\"properties\": {
\"property\": [{
\"name\": \"env.Version\",
\"value\": \"${{ inputs.version }}\"
}
]
}
}"
done