Update github action file
This commit is contained in:
parent
947a7543f1
commit
d7436d4ab7
|
|
@ -1,61 +0,0 @@
|
|||
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:
|
||||
sonarqube_check:
|
||||
runs-on: sonarqube
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run SonarScanner
|
||||
run: |
|
||||
export BRANCH_NAME="${GITHUB_REF#refs/heads/}"
|
||||
export SAFE_BRANCH_NAME="${BRANCH_NAME//\//_}"
|
||||
export PROJECT_KEY="odex25_standard_modules_${SAFE_BRANCH_NAME}"
|
||||
export PROJECT_NAME="Standard Modules ${SAFE_BRANCH_NAME^}"
|
||||
export SOURCE_FOLDER_NAME="${BRANCH_NAME#master_}"
|
||||
export PROJECT_VERSION="1.0"
|
||||
export SONAR_HOST_URL=${{ secrets.SONAR_HOST_URL }}
|
||||
export SONAR_TOKEN=${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
sonar-scanner \
|
||||
-Dsonar.projectKey="$PROJECT_KEY" \
|
||||
-Dsonar.projectName="$PROJECT_NAME" \
|
||||
-Dsonar.projectVersion="$PROJECT_VERSION" \
|
||||
-Dsonar.sources="$SOURCE_FOLDER_NAME" \
|
||||
-Dsonar.inclusions="**/*.py, **/*.xml, **/*.js, **/*.html, **/*.css" \
|
||||
-Dsonar.exclusions="**/__manifest__.py, **/migrations/**, **/__pycache__/**" \
|
||||
-Dsonar.sourceEncoding="UTF-8" \
|
||||
-Dsonar.host.url="$SONAR_HOST_URL" \
|
||||
-Dsonar.login="$SONAR_TOKEN"
|
||||
|
||||
- name: Cleanup workspace
|
||||
if: always()
|
||||
run: |
|
||||
rm -rf $GITHUB_WORKSPACE/*
|
||||
Loading…
Reference in New Issue