From d74c4f055d113eadbc0449c6424ce559a46793f8 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Thu, 3 Oct 2024 08:03:50 -0400 Subject: [PATCH 1/3] Skipping SonarQube analysis on fork repos and adding POWPEG_REPO_OWNER input --- .github/workflows/build_and_test.yml | 2 +- .github/workflows/rit.yml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f37ef5fd2..25d2712a9 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -305,7 +305,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | chmod +x gradlew - if [ "$GH_EVENT" = pull_request ]; then + if [ "$GH_EVENT" = pull_request ] && [ "${{ github.event.pull_request.head.repo.fork }}" != "true" ]; then ./gradlew sonarqube --warning-mode all --no-daemon --stacktrace --info -x build -x test \ -Dsonar.pullrequest.base="$GH_PR_BASE_REF" \ -Dsonar.pullrequest.branch="$GH_PR_HEAD_REF" \ diff --git a/.github/workflows/rit.yml b/.github/workflows/rit.yml index a14274290..da5cd47f4 100644 --- a/.github/workflows/rit.yml +++ b/.github/workflows/rit.yml @@ -34,6 +34,8 @@ jobs: github_event_pull_request_number: ${{ github.event.pull_request.number }} github_head_ref: ${{ github.head_ref }} github_ref_name: ${{ github.ref_name }} + github_event_pull_request_head_repo_owner_login: ${{ github.event.pull_request.head.repo.owner.login }} + github_repository_owner: ${{ github.repository_owner }} run: | PR_DESCRIPTION=pr-description.txt @@ -94,6 +96,10 @@ jobs: exit 1 fi + # Set the Repo Owner + POWPEG_REPO_OWNER="${github_event_pull_request_head_repo_owner_login:-$github_repository_owner}" + + echo "POWPEG_REPO_OWNER=$POWPEG_REPO_OWNER" >> $GITHUB_ENV echo "RSKJ_BRANCH=$RSKJ_BRANCH" >> $GITHUB_ENV echo "RIT_BRANCH=$RIT_BRANCH" >> $GITHUB_ENV echo "POWPEG_BRANCH=$POWPEG_BRANCH" >> $GITHUB_ENV @@ -119,6 +125,7 @@ jobs: rskj-branch: ${{ env.RSKJ_BRANCH }} powpeg-node-branch: ${{ env.POWPEG_BRANCH }} rit-branch: ${{ env.RIT_BRANCH }} + powpeg-repo-owner: ${{ env.POWPEG_REPO_OWNER }} - name: Send Slack Notification on Success if: success() && github.event.pull_request.head.repo.owner.login == 'rsksmart' From 121f6462cf11b36ba9d9444d0735f6b4239e2ec3 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Mon, 7 Oct 2024 09:19:43 -0400 Subject: [PATCH 2/3] Updating variables names --- .github/workflows/rit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rit.yml b/.github/workflows/rit.yml index da5cd47f4..8ac8258e3 100644 --- a/.github/workflows/rit.yml +++ b/.github/workflows/rit.yml @@ -97,9 +97,9 @@ jobs: fi # Set the Repo Owner - POWPEG_REPO_OWNER="${github_event_pull_request_head_repo_owner_login:-$github_repository_owner}" + REPO_OWNER="${github_event_pull_request_head_repo_owner_login:-$github_repository_owner}" - echo "POWPEG_REPO_OWNER=$POWPEG_REPO_OWNER" >> $GITHUB_ENV + echo "REPO_OWNER=$REPO_OWNER" >> $GITHUB_ENV echo "RSKJ_BRANCH=$RSKJ_BRANCH" >> $GITHUB_ENV echo "RIT_BRANCH=$RIT_BRANCH" >> $GITHUB_ENV echo "POWPEG_BRANCH=$POWPEG_BRANCH" >> $GITHUB_ENV @@ -125,7 +125,7 @@ jobs: rskj-branch: ${{ env.RSKJ_BRANCH }} powpeg-node-branch: ${{ env.POWPEG_BRANCH }} rit-branch: ${{ env.RIT_BRANCH }} - powpeg-repo-owner: ${{ env.POWPEG_REPO_OWNER }} + repo-owner: ${{ env.REPO_OWNER }} - name: Send Slack Notification on Success if: success() && github.event.pull_request.head.repo.owner.login == 'rsksmart' From 253c384f22fba23fb537d84a5898d1c9e9518614 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Fri, 11 Oct 2024 10:35:35 -0400 Subject: [PATCH 3/3] Updating rit tag --- .github/workflows/rit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rit.yml b/.github/workflows/rit.yml index 8ac8258e3..147e060bc 100644 --- a/.github/workflows/rit.yml +++ b/.github/workflows/rit.yml @@ -120,7 +120,7 @@ jobs: echo "SAFE_BRANCH_NAME=$SAFE_BRANCH_NAME" >> $GITHUB_ENV - name: Run Rootstock Integration Tests - uses: rsksmart/rootstock-integration-tests@497172fd38dcfaf48c77f9bb1eeb6617eef5eed6 #v1 + uses: rsksmart/rootstock-integration-tests@e86332474179a63f027d0fe969687d3d24f34c29 #v1 with: rskj-branch: ${{ env.RSKJ_BRANCH }} powpeg-node-branch: ${{ env.POWPEG_BRANCH }}