Skip to content

Commit

Permalink
fix job
Browse files Browse the repository at this point in the history
  • Loading branch information
alkoleft committed May 22, 2024
1 parent e039bff commit 4e55456
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/sq-pr.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
name: Анализ в SonarQube (pull-request)

on: [pull_request_target]

on:
- pull_request
# - pull_request_target Не поддерживается 1CDevFlow/sonar-quality-gate и sonarqube-community-branch-plugin, необходимо доработать action
jobs:
SonarScanner:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout PR
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0
# Для поддержки pull_request и pull_request_target
# https://github.com/android-password-store/Android-Password-Store/pull/1247
ref: refs/pull/${{ github.event.number }}/merge
fetch-depth: 0

# https://docs.sonarqube.org/latest/analysis/pull-request/
- name: Анализ в SonarQube (pull-request)
if: github.event_name == 'pull_request'
uses: alkoleft/sonar-quality-gate@master
# https://docs.sonarqube.org/latest/analysis/pull-request/
- name: Analyze (pull-request)
uses: 1CDevFlow/sonar-quality-gate@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_URL: "https://api.github.com"
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_URL: https://sonar.openbsl.ru
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_REPOSITORY: bia-technologies/yaxunit
CI_MERGE_REQUEST_IID: ${{ github.event.pull_request.number }}
CI_MERGE_REQUEST_IID: ${{ github.event.number }}
DEBUG: ${{ runner.debug }}

0 comments on commit 4e55456

Please sign in to comment.