Still trying to retrieve report results in Markdown...

This commit is contained in:
2024-12-18 10:30:03 -05:00
parent 6b24ca1a91
commit 0cc232f298
+3 -18
View File
@@ -87,29 +87,14 @@ jobs:
echo "Cleaning up quality gate response..."
echo '${{ steps.quality-gate-check.outputs.quality-gate-result }}' > qg_input.txt
sed -E 's/([a-zA-Z0-9_]+):/\\"\1\\":/g; s/:([^",{}\[\]]+)/:"\1"/g' qg_input.txt > qg_raw.json
jq -c '.' qg_raw.json > qg_fixed_json
cat qg_fixed_json
echo "qg_fixed_json=$(cat qg_fixed_json)" >> $GITHUB_OUTPUT
jq -c '.' qg_raw.json > qg_fixed_json.json
echo "qg_fixed_json=$(cat qg_fixed_json.json)" >> $GITHUB_ENV
- name: Convert JSON report to markdown
id: convert-json-to-md
uses: parkerbxyz/json-to-markdown-table@v1.1.2
with:
json: ${{ steps.json-cleanup.outputs.qg_fixed_json }}
table_title: SonarQube Quality Gate Results
table_columns: metric,value
table_column_alignment: left,right
table_cell_padding: 1
table_cell_padding_left: 2
table_cell_padding_right: 2
table_cell_padding_top: 1
table_cell_padding_bottom: 1
table_cell_border: true
table_cell_border_color: '#000000'
table_cell_border_width: 1
table_cell_border_style: solid
table_cell_border_radius: 0
table_cell_border_radius_top_left: 0
json: ${{ env.qg_fixed_json }}
- name: Verify markdown output
run: |