Re-testing flow.
This commit is contained in:
@@ -57,6 +57,8 @@ jobs:
|
||||
name: SonarQube Analysis
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-and-create-pr
|
||||
outputs:
|
||||
qg_status: ${{ steps.quality-gate.outputs.quality-gate-status }}
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
@@ -130,8 +132,8 @@ jobs:
|
||||
# Job 3: Merge PR if Quality Gate passes
|
||||
dry-run-merge-pr:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check-and-create-pr, sonarqube-analysis]
|
||||
if: needs.sonarqube-analysis.outputs.quality_gate_status == 'PASSED'
|
||||
needs: sonarqube-analysis
|
||||
if: needs.sonarqube-analysis.outputs.qg_status == 'PASSED'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
@@ -145,19 +147,19 @@ jobs:
|
||||
up: true
|
||||
up-opts: -d --dry-run
|
||||
|
||||
- name: Merge PR in Gitea
|
||||
uses: prasiman/gocurl@v1
|
||||
with:
|
||||
url: "${{ secrets.GITEA_INSTANCE_URL }}/repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/pulls/${{ needs.check-and-create-pr.outputs.pr_index }}"
|
||||
method: "POST"
|
||||
headers: '{ "Authorization": "token ${{ secrets.GITEA_API_TOKEN }}", "Content-Type": "application/json" }'
|
||||
params: >-
|
||||
{
|
||||
"Do": "merge",
|
||||
"delete_branch_after_merge": true,
|
||||
"force_merge": true,
|
||||
"merge_when_checks_succeed": true
|
||||
}
|
||||
# - name: Merge PR in Gitea
|
||||
# uses: prasiman/gocurl@v1
|
||||
# with:
|
||||
# url: "${{ secrets.GITEA_INSTANCE_URL }}/repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/pulls/${{ needs.check-and-create-pr.outputs.pr_index }}"
|
||||
# method: "POST"
|
||||
# headers: '{ "Authorization": "token ${{ secrets.GITEA_API_TOKEN }}", "Content-Type": "application/json" }'
|
||||
# params: >-
|
||||
# {
|
||||
# "Do": "merge",
|
||||
# "delete_branch_after_merge": true,
|
||||
# "force_merge": true,
|
||||
# "merge_when_checks_succeed": true
|
||||
# }
|
||||
|
||||
- name: Confirm Merge
|
||||
run: echo "PR has been successfully merged into main."
|
||||
# - name: Confirm Merge
|
||||
# run: echo "PR has been successfully merged into main."
|
||||
|
||||
Reference in New Issue
Block a user