@@ -2,9 +2,13 @@ name: 'codefresh-report-image'
22description : ' Report image to codefresh'
33inputs :
44 VERSION :
5- description : specify client version
5+ description : Underling reporter image version used by plugin
66 required : false
77 default : latest
8+ IMAGE :
9+ description : Underling reporter image used by plugin
10+ required : false
11+ default : quay.io/codefresh/codefresh-report-image
812 CF_API_KEY :
913 description : " Codefresh API KEY"
1014 required : true
@@ -18,7 +22,7 @@ inputs:
1822 description : " Codefresh runtime name"
1923 required : true
2024 CF_VERBOSE :
21- description : " verbose output"
25+ description : " Verbose output"
2226 required : false
2327 CF_IMAGE :
2428 description : " image reported, quay.io/codefresh/newly-built-image:0.0.1"
@@ -46,7 +50,7 @@ inputs:
4650 description : " Generic registry domain"
4751 CF_INSECURE :
4852 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. "
5054 CF_WORKFLOW_URL :
5155 required : false
5256 description : " external url for the workflow"
@@ -118,21 +122,23 @@ runs:
118122 - shell : bash
119123 env :
120124 VERSION : " ${{ inputs.VERSION }}"
125+ IMAGE : " ${{ inputs.IMAGE }}"
126+ CF_VERBOSE : " ${{ inputs.CF_VERBOSE }}"
121127 CF_HOST : " ${{ inputs.CF_HOST }}"
122128 CF_PLATFORM_URL : " ${{ inputs.CF_PLATFORM_URL }}"
123129 CF_RUNTIME_NAME : " ${{ inputs.CF_RUNTIME_NAME }}"
124130 CF_API_KEY : " ${{ inputs.CF_API_KEY }}"
131+
132+ CF_INSECURE : " ${{ inputs.CF_INSECURE }}"
125133
126134 CF_IMAGE : " ${{ inputs.CF_IMAGE }}"
127- CF_VERBOSE : " ${{ inputs.CF_VERBOSE }}"
128135 CF_CONTAINER_REGISTRY_INTEGRATION : " ${{ inputs.CF_CONTAINER_REGISTRY_INTEGRATION }}"
129136 CF_ISSUE_TRACKING_INTEGRATION : " ${{ inputs.CF_ISSUE_TRACKING_INTEGRATION }}"
130137 CF_DOCKERHUB_USERNAME : " ${{ inputs.CF_DOCKERHUB_USERNAME }}"
131138 CF_DOCKERHUB_PASSWORD : " ${{ inputs.CF_DOCKERHUB_PASSWORD }}"
132139 CF_REGISTRY_USERNAME : " ${{ inputs.CF_REGISTRY_USERNAME }}"
133140 CF_REGISTRY_PASSWORD : " ${{ inputs.CF_REGISTRY_PASSWORD }}"
134141 CF_REGISTRY_DOMAIN : " ${{ inputs.CF_REGISTRY_DOMAIN }}"
135- CF_INSECURE : " ${{ inputs.CF_INSECURE }}"
136142 CF_WORKFLOW_URL : " ${{ inputs.CF_WORKFLOW_URL }}"
137143 CF_WORKFLOW_NAME : " ${{ inputs.CF_WORKFLOW_NAME }}"
138144 CF_LOGS_URL : " ${{ inputs.CF_LOGS_URL }}"
@@ -178,7 +184,9 @@ runs:
178184 export CF_WORKFLOW_NAME="${CF_WORKFLOW_NAME:-$GITHUB_WORKFLOW_NAME}"
179185 export CF_GIT_PROVIDER="${CF_GIT_PROVIDER:-github}"
180186 export CF_CI_TYPE=github-actions
187+
188+ export NODE_TLS_REJECT_UNAUTHORIZED=$([[ "$CF_INSECURE" == "true" ]] && echo 0 || echo 1)
181189
182190 env | cut -f 1 -d "=" | grep -E "^CF_" > cf_env
183191 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