Skip to content

Commit

Permalink
[build] Run certain actions only in the main repository (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
manugarg committed Nov 3, 2023
1 parent a937b15 commit 31cbe75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
gotestsum --rerun-fails --packages=./... -- ${{ env.EXTRA_TEST_FLAGS }} -race -covermode=atomic
- name: SonarCloud Scan
if: (matrix.os == 'ubuntu-latest') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
if: matrix.os == 'ubuntu-latest' && github.repository == 'cloudprober/cloudprober' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:

build_and_push_docker_multiarch:
name: Build and push multiarch docker image
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
if: github.repository == 'cloudprober/cloudprober' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
needs: [build-and-test, build-binaries]
runs-on: ubuntu-latest

Expand Down

0 comments on commit 31cbe75

Please sign in to comment.