@@ -2,9 +2,13 @@ name: 'codefresh-report-image'
2
2
description : ' Report image to codefresh'
3
3
inputs :
4
4
VERSION :
5
- description : specify client version
5
+ description : Underling reporter image version used by plugin
6
6
required : false
7
7
default : latest
8
+ IMAGE :
9
+ description : Underling reporter image used by plugin
10
+ required : false
11
+ default : quay.io/codefresh/codefresh-report-image
8
12
CF_API_KEY :
9
13
description : " Codefresh API KEY"
10
14
required : true
@@ -18,7 +22,7 @@ inputs:
18
22
description : " Codefresh runtime name"
19
23
required : true
20
24
CF_VERBOSE :
21
- description : " verbose output"
25
+ description : " Verbose output"
22
26
required : false
23
27
CF_IMAGE :
24
28
description : " image reported, quay.io/codefresh/newly-built-image:0.0.1"
@@ -46,7 +50,7 @@ inputs:
46
50
description : " Generic registry domain"
47
51
CF_INSECURE :
48
52
required : false
49
- description : " security flag for standard registry protocol, when set to true it enables http protocol "
53
+ description : " Disable TLS certificate validation for ALL of the https traffic during the reporting. It is NOT recommended, as it could make your application vulnerable to man-in-the-middle (MITM) attacks. "
50
54
CF_WORKFLOW_URL :
51
55
required : false
52
56
description : " external url for the workflow"
@@ -118,21 +122,23 @@ runs:
118
122
- shell : bash
119
123
env :
120
124
VERSION : " ${{ inputs.VERSION }}"
125
+ IMAGE : " ${{ inputs.IMAGE }}"
126
+ CF_VERBOSE : " ${{ inputs.CF_VERBOSE }}"
121
127
CF_HOST : " ${{ inputs.CF_HOST }}"
122
128
CF_PLATFORM_URL : " ${{ inputs.CF_PLATFORM_URL }}"
123
129
CF_RUNTIME_NAME : " ${{ inputs.CF_RUNTIME_NAME }}"
124
130
CF_API_KEY : " ${{ inputs.CF_API_KEY }}"
131
+
132
+ CF_INSECURE : " ${{ inputs.CF_INSECURE }}"
125
133
126
134
CF_IMAGE : " ${{ inputs.CF_IMAGE }}"
127
- CF_VERBOSE : " ${{ inputs.CF_VERBOSE }}"
128
135
CF_CONTAINER_REGISTRY_INTEGRATION : " ${{ inputs.CF_CONTAINER_REGISTRY_INTEGRATION }}"
129
136
CF_ISSUE_TRACKING_INTEGRATION : " ${{ inputs.CF_ISSUE_TRACKING_INTEGRATION }}"
130
137
CF_DOCKERHUB_USERNAME : " ${{ inputs.CF_DOCKERHUB_USERNAME }}"
131
138
CF_DOCKERHUB_PASSWORD : " ${{ inputs.CF_DOCKERHUB_PASSWORD }}"
132
139
CF_REGISTRY_USERNAME : " ${{ inputs.CF_REGISTRY_USERNAME }}"
133
140
CF_REGISTRY_PASSWORD : " ${{ inputs.CF_REGISTRY_PASSWORD }}"
134
141
CF_REGISTRY_DOMAIN : " ${{ inputs.CF_REGISTRY_DOMAIN }}"
135
- CF_INSECURE : " ${{ inputs.CF_INSECURE }}"
136
142
CF_WORKFLOW_URL : " ${{ inputs.CF_WORKFLOW_URL }}"
137
143
CF_WORKFLOW_NAME : " ${{ inputs.CF_WORKFLOW_NAME }}"
138
144
CF_LOGS_URL : " ${{ inputs.CF_LOGS_URL }}"
@@ -178,7 +184,9 @@ runs:
178
184
export CF_WORKFLOW_NAME="${CF_WORKFLOW_NAME:-$GITHUB_WORKFLOW_NAME}"
179
185
export CF_GIT_PROVIDER="${CF_GIT_PROVIDER:-github}"
180
186
export CF_CI_TYPE=github-actions
187
+
188
+ export NODE_TLS_REJECT_UNAUTHORIZED=$([[ "$CF_INSECURE" == "true" ]] && echo 0 || echo 1)
181
189
182
190
env | cut -f 1 -d "=" | grep -E "^CF_" > cf_env
183
191
echo "Provided env vars: $(cat cf_env|xargs echo)"
184
- docker run -- env-file=cf_env "quay.io/codefresh/codefresh-report-image :$VERSION"
192
+ docker run -e NODE_TLS_REJECT_UNAUTHORIZED=$NODE_TLS_REJECT_UNAUTHORIZED -- env-file=cf_env "$IMAGE :$VERSION"
0 commit comments