From b46286656a1fbd0fb4e7176e723c15605ebbb6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfredo=20Espa=C3=B1a?= Date: Thu, 17 Oct 2024 09:40:07 -0600 Subject: [PATCH] Refactor pull request from forks (#1424) * Refactor pull request from forks --- .github/workflows/pull_request.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 93fe5905e..555af65fd 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -6,8 +6,6 @@ on: - main pull_request: types: [opened, synchronize, reopened] - pull_request_target: - types: [opened, synchronize, reopened] jobs: build-jammy: @@ -33,16 +31,21 @@ jobs: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - - name: Verify with Maven + - name: Build Terrakube + if: github.event.pull_request.head.repo.full_name == github.repository run: mvn -B verify --file pom.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=AzBuilder_azb-server env: USER_NAME: ${{ secrets.USER_NAME }} ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + - name: Build Terrakube from Fork + if: github.event.pull_request.head.repo.full_name != github.repository + run: mvn clean install build-alpaquita: runs-on: ubuntu-latest + if: github.event.pull_request.head.repo.full_name == github.repository steps: - uses: actions/checkout@v4 with: