Update github action file
This commit is contained in:
parent
c1828d2c6a
commit
29fb25ad93
|
|
@ -0,0 +1,61 @@
|
|||
name: SonarQube Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master_odex-event
|
||||
- master_odex25_accounting
|
||||
- master_odex25_base
|
||||
- master_odex25_dms
|
||||
- master_odex25_fleet
|
||||
- master_odex25_helpdesk
|
||||
- master_odex25_hr
|
||||
- master_odex25_inventory
|
||||
- master_odex25_maintenance
|
||||
- master_odex25_mobile
|
||||
- master_odex25_pos
|
||||
- master_odex25_project
|
||||
- master_odex25_purchase
|
||||
- master_odex25_realstate
|
||||
- master_odex25_sales
|
||||
- master_odex25_survey
|
||||
- master_odex25_transactions
|
||||
- master_odex25_website
|
||||
- master_openeducat_erp-14.0.1.0
|
||||
- master_odex25_ensan
|
||||
- master_odex25_donation
|
||||
|
||||
|
||||
jobs:
|
||||
sonar:
|
||||
runs-on: sonarqube
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run SonarScanner
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
|
||||
SAFE_BRANCH_NAME="${BRANCH_NAME//\//_}"
|
||||
PROJECT_KEY="odex25_standard_modules_${SAFE_BRANCH_NAME}"
|
||||
PROJECT_NAME="Standard Modules ${SAFE_BRANCH_NAME^}"
|
||||
SOURCE_FOLDER_NAME="${BRANCH_NAME#master_}"
|
||||
PROJECT_VERSION="1.0"
|
||||
|
||||
sonar-scanner \
|
||||
-Dsonar.projectKey=$PROJECT_KEY \
|
||||
-Dsonar.projectName="$PROJECT_NAME" \
|
||||
-Dsonar.projectVersion=$PROJECT_VERSION \
|
||||
-Dsonar.sources=$SOURCE_FOLDER_NAME \
|
||||
-Dsonar.inclusions="**/*.py, **/*.xml, **/*.js" \
|
||||
-Dsonar.exclusions="**/__manifest__.py, **/migrations/**, **/__pycache__/**" \
|
||||
-Dsonar.sourceEncoding="UTF-8" \
|
||||
-Dsonar.host.url="https://sonar.odex.sa" \
|
||||
-Dsonar.login=$SONAR_TOKEN
|
||||
|
||||
- name: Cleanup workspace
|
||||
if: always()
|
||||
run: |
|
||||
rm -rf $GITHUB_WORKSPACE/*
|
||||
Loading…
Reference in New Issue