Skip to content

Version Packages (#3881) #83

Version Packages (#3881)

Version Packages (#3881) #83

Workflow file for this run

name: "SonarCloud"
on:
push:
branches:
- dev
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
sonarcloud:
strategy:
matrix:
package:
- graphql
- introspector
- ogm
- plugins/graphql-plugin-subscriptions-amqp
runs-on: ubuntu-latest
environment:
name: sonarcloud
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Uppercase package name
run: |
lowercase_package=${{ matrix.package }}
lowercase_package=$(echo "$lowercase_package" | tr - _ | sed 's/plugins\///g')
echo "SONAR_TOKEN_SECRET=SONAR_TOKEN_${lowercase_package^^}" >>"${GITHUB_ENV}"
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
projectBaseDir: packages/${{ matrix.package }}
env:
GITHUB_TOKEN: ${{ secrets.NEO4J_TEAM_GRAPHQL_PERSONAL_ACCESS_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets[env.SONAR_TOKEN_SECRET] }}