@@ -40,14 +40,6 @@ inputs:
4040 - Linux
4141 - Windows
4242 required : true
43- token :
44- description : |
45- The token used to authenticate when performing GitHub API operations.
46- When running this action on github.com, the default value is sufficient. When running on
47- GHES, you can pass a personal access token for github.com if you are experiencing
48- rate limiting.
49- default : ${{ github.server_url == 'https://github.com' && github.token || '' }}
50- required : true
5143secrets :
5244 codeclimate-token :
5345 description : |
10294 id : output_sha
10395 shell : bash
10496 run : |
105- printf "sha=%s\n" $(git rev-parse --verify '${{ inputs.sha }}' ) >> "$GITHUB_OUTPUT"
106- printf "BUILD_SHA=%s\n" $(git rev-parse --verify '${{ inputs.sha }}' ) >> "$GITHUB_ENV"
97+ printf "sha=%s\n" $(git rev-parse --verify HEAD ) >> "$GITHUB_OUTPUT"
98+ printf "BUILD_SHA=%s\n" $(git rev-parse --verify HEAD ) >> "$GITHUB_ENV"
10799 - name : " Identify Python Version"
108100 id : output_python
109101 if : ${{ !cancelled() }}
@@ -129,7 +121,7 @@ runs:
129121 printf "os=%s\n" "${OS_INPUT}" >> "$GITHUB_OUTPUT"
130122 OS=${OS_INPUT}
131123 else
132- printf "os=%s\n" "${OS:-' unknown' }" >> "$GITHUB_OUTPUT"
124+ printf "os=%s\n" "${OS:-unknown}" >> "$GITHUB_OUTPUT"
133125 fi
134126 printf "%s\n" "OS=${OS}" >> "$GITHUB_ENV"
135127 - name : " Prepare Artifact Name"
@@ -171,7 +163,7 @@ runs:
171163 if [[ -x "${BINDIR:-${LOCALBIN}}/deepsource" ]] ; then
172164 printf "can_upload_to_deepsource=true\n" >> "$GITHUB_OUTPUT"
173165 printf "::debug::%s\n" "Found ${BINDIR:-${LOCALBIN}}/deepsource"
174- printf "deepsource_executable=${BINDIR:-${LOCALBIN}}/deepsource\n " >> "$GITHUB_OUTPUT"
166+ printf "deepsource_executable=%s\n" " ${BINDIR:-${LOCALBIN}}/deepsource" >> "$GITHUB_OUTPUT"
175167 else
176168 printf "::warning, title='Missing tool':: %s\n" "Can't find deepsource tool."
177169 printf "can_upload_to_deepsource=false\n" >> "$GITHUB_OUTPUT"
@@ -181,7 +173,7 @@ runs:
181173 if [[ -x $(command -v coveralls) ]] ; then
182174 printf "can_upload_to_coveralls=true\n" >> "$GITHUB_OUTPUT"
183175 printf "::debug::%s %s\n" "Found" $(command -v coveralls)
184- printf "coveralls_executable=%s\n" $(command -v coveralls)" >> "$GITHUB_OUTPUT"
176+ printf "coveralls_executable=%s\n" $(command -v coveralls) >> "$GITHUB_OUTPUT"
185177 else
186178 printf "::warning, title='Missing tool':: %s\n" "Can't find coveralls tool."
187179 printf "can_upload_to_coveralls=false\n" >> "$GITHUB_OUTPUT"
@@ -224,7 +216,7 @@ runs:
224216 rm -f coverage_codecov 2>/dev/null || true ; wait ;
225217 printf "\n\n" >> "${GITHUB_STEP_SUMMARY}"
226218 fi
227- if [[ -d "${{ github.workspace }}/test-reports/coverage.xml" ]] ; then
219+ if [[ -f "${{ github.workspace }}/test-reports/coverage.xml" ]] ; then
228220 printf "can_upload_to_codecov=true\n" >> "$GITHUB_OUTPUT"
229221 else
230222 printf "can_upload_to_codecov=false\n" >> "$GITHUB_OUTPUT"
@@ -308,7 +300,7 @@ runs:
308300 CODECLIMATE_REPO_TOKEN : ${{ github.server_url == 'https://github.com' && secrets.codeclimate-token || '' }}
309301 CC_TEST_REPORTER_ID : ${{ github.server_url == 'https://github.com' && secrets.cc-test-reporter-id || '' }}
310302 run : |
311- if [[ "${{ input .tests-outcome }}" == "success" ]] ; then
303+ if [[ "${{ inputs .tests-outcome }}" == "success" ]] ; then
312304 ./cc-test-reporter after-build --exit-code 0 || exit 1 ;
313305 else
314306 ./cc-test-reporter after-build --exit-code 1 || exit 1 ;
@@ -330,7 +322,7 @@ runs:
330322 COVERALLS_REPO_TOKEN : ${{ github.server_url == 'https://github.com' && secrets.coveralls-token || '' }}
331323 COVERALLS_TOOL : ${{ steps.output_upload_tools.outputs.coveralls_executable }}
332324 run : |
333- if [[ "${{ input .tests-outcome }}" == "success" ]] ; then
325+ if [[ "${{ inputs .tests-outcome }}" == "success" ]] ; then
334326 ${COVERALLS_TOOL} report test-reports/coverage.xml --base-path="${{ github.workspace }}" --format=python --service-job-id=${{ github.run_id }} --parallel --job-flag='${{ steps.output_os.outputs.os }}-${{ steps.output_python.outputs.python-version }}' --build-number=${{ inputs.job_code }} || exit 1 ;
335327 else
336328 ${COVERALLS_TOOL} report test-reports/coverage.xml --base-path="${{ github.workspace }}" --allow-empty --format=python --service-job-id=${{ github.run_id }} --parallel --job-flag='${{ steps.output_os.outputs.os }}-${{ steps.output_python.outputs.python-version }}' --build-number=${{ inputs.job_code }} || exit 1 ;
@@ -341,7 +333,7 @@ runs:
341333 shell : bash
342334 run : |
343335 if [[ "${{ steps.output_can_upload.outputs.can_upload }}" == "true" ]] ; then
344- if [[ "${{ input .tests-outcome }}" == "success" ]] ; then
336+ if [[ "${{ inputs .tests-outcome }}" == "success" ]] ; then
345337 THE_RESULT="success"
346338 else
347339 THE_RESULT="neutral"
0 commit comments