Seriously this time, maybe...?
This commit is contained in:
@@ -108,42 +108,29 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
json: "${{ steps.json-cleanup.outputs.conditions }}"
|
json: "${{ steps.json-cleanup.outputs.conditions }}"
|
||||||
|
|
||||||
- name: verify md table
|
|
||||||
run: |
|
|
||||||
echo "${{ steps.convert-json-to-md.outputs.table }}"
|
|
||||||
|
|
||||||
# - name: Start Gitea-Sonarqube Bot
|
|
||||||
# uses: docker://justusbunsi/gitea-sonarqube-bot:v0.3.3
|
|
||||||
# with:
|
|
||||||
# # Required inputs for the bot
|
|
||||||
# args: >
|
|
||||||
# --sonarqube-url ${{ secrets.SONARQUBE_URL }}
|
|
||||||
# --sonarqube-token ${{ secrets.SONARQUBE_TOKEN }}
|
|
||||||
# --git-provider github
|
|
||||||
# --git-api-url https://api.github.com
|
|
||||||
# --git-token ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# --repository my-org/my-repo
|
|
||||||
# --pull-request-id ${{ github.event.pull_request.number }}
|
|
||||||
|
|
||||||
- name: Post SonarQube Results as Comment
|
- name: Post SonarQube Results as Comment
|
||||||
run: |
|
run: |
|
||||||
|
payload=$(jq -n --arg body "SonarQube analysis results:\n\n${{ steps.convert-json-to-md.outputs.table }}\n\n${{ steps.quality-gate.outputs.quality-gate-status }}" \
|
||||||
|
--arg path "path" \
|
||||||
|
--argjson position 0 \
|
||||||
|
'{
|
||||||
|
body: "string",
|
||||||
|
comments: [
|
||||||
|
{
|
||||||
|
body: $body,
|
||||||
|
path: $path,
|
||||||
|
old_position: $position,
|
||||||
|
new_position: $position
|
||||||
|
}
|
||||||
|
],
|
||||||
|
event: "COMMENT"
|
||||||
|
}')
|
||||||
curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${{ steps.cc-pr.outputs.pr_index }}/reviews \
|
curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${{ steps.cc-pr.outputs.pr_index }}/reviews \
|
||||||
-X POST \
|
-X POST \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{
|
-d '${payload}'
|
||||||
"body": "string",
|
|
||||||
"comments": [
|
|
||||||
{
|
|
||||||
"body": "SonarQube analysis results:\n\n${{ steps.convert-json-to-md.outputs.table }}\n\n${{ steps.quality-gate.outputs.quality-gate-status }}",
|
|
||||||
"path": "path",
|
|
||||||
"position": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"event": "COMMENT"
|
|
||||||
}'
|
|
||||||
}'
|
|
||||||
|
|
||||||
# Job 3: Merge PR if Quality Gate passes
|
# Job 3: Merge PR if Quality Gate passes
|
||||||
# merge-pr:
|
# merge-pr:
|
||||||
|
|||||||
Reference in New Issue
Block a user