Skip to content

Commit

Permalink
feat(ci): only on push
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajpiar committed Jun 12, 2024
1 parent b636b88 commit 239c430
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- '**'
- "**"

jobs:
prepare-rskj:
Expand Down Expand Up @@ -90,16 +90,16 @@ jobs:
- name: If GH event is PR
if: github.event_name == 'pull_request'
run: |
git branch -f master origin/master
pr_number==${{ github.event.pull_request.number }}
extra_flags="-Dsonar.pullrequest.base=master
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.key=$pr_number"
pr_number=${{ github.event.pull_request.number }}
extra_flags="-Dsonar.pullrequest.base=${{ github.base_ref }} \
-Dsonar.pullrequest.branch=${{ github.head_ref }} \
-Dsonar.pullrequest.key=$pr_number"
./gradlew sonarqube --no-daemon -x build -x test \
$extra_flags \
-Dsonar.organization=rsksmart \
-Dsonar.host.url="https://sonarcloud.io" \
-Dsonar.token="${{ secrets.SONAR_TOKEN }}"
$extra_flags \
-Dsonar.organization=rsksmart \
-Dsonar.host.url="https://sonarcloud.io" \
-Dsonar.token="${{ secrets.SONAR_TOKEN }}"

- name: If not
if: github.event_name != 'pull_request'
Expand Down

0 comments on commit 239c430

Please sign in to comment.