From 4bc41e20219e464c62598eb98445d606366ddaad Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Tue, 4 Jan 2022 19:05:09 +0100 Subject: [PATCH] [issue-1990] - Add github token (#1991) --- .github/workflows/maven-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index fe88f0b31e3..87f18ea6bb1 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -50,8 +50,11 @@ jobs: java-version: 11 - name: Build PR with Maven + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: ${{ github.event_name == 'pull_request' }} run: | + git fetch --no-tags https://github.com/open-metadata/OpenMetadata.git +refs/heads/main:refs/remotes/origin/main mvn -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \ -Dsonar.pullrequest.branch=${{ github.head_ref }} \ @@ -59,5 +62,7 @@ jobs: -Dsonar.pullrequest.provider=github clean install - name: Build with Maven + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: ${{ github.event_name == 'push' }} run: mvn -Dsonar.login=${{ secrets.SONAR_TOKEN }} clean install