Skip to content

Commit

Permalink
edit SonarQube workflow + edit docker-compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
meleksabit committed Sep 17, 2024
1 parent 0dfa132 commit a21508e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
- name: Set up Docker Compose
run: sudo apt-get install docker-compose

- name: Create .env file
run: echo "SONAR_TOKEN=${{ secrets.SONAR_TOKEN }}" > .env

- name: Build and Run SonarQube with Docker Compose
run: docker-compose up -d

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
- sonarnet
environment:
- SONAR_HOST_URL=http://sonar-server:9000
- SONAR_TOKEN=${{ secrets.SONAR_TOKEN }} # GitHub Secret for SonarQube Token
- SONAR_TOKEN=${SONAR_TOKEN} # Use standard Docker variable interpolation here
volumes:
- .:/usr/src
entrypoint: ["/bin/bash", "-c", "sonar-scanner -Dsonar.projectKey=Mutillidae-II-2 -Dsonar.sources=."]
Expand Down

0 comments on commit a21508e

Please sign in to comment.