Skip to content

Commit 223e684

Browse files
committed
fix: use github context instead of shell operation
1 parent e58a514 commit 223e684

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/maven-and-docker-build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ jobs:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3737
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3838
run: |
39-
REPO_NAME=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
40-
4139
mvn verify -B -P prod,coverage "-Dstyle.color=always" \
4240
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
4341
-Dsonar.host.url="https://sonarcloud.io" \
44-
-Dsonar.organization=soat-tech-challenge \
45-
-Dsonar.projectKey=soat-tech-challenge_$REPO_NAME
42+
-Dsonar.organization=${{ github.repository_owner }} \
43+
-Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}
4644
4745
- name: Build Dockerfile (no push)
4846
if: ${{ inputs.docker == true || inputs.docker == 'true' }}

0 commit comments

Comments
 (0)