Skip to content

Commit

Permalink
chore: Run deploy GitHub workflow job on main repo only
Browse files Browse the repository at this point in the history
Prevents deploy build job to fail on forked repositories
  • Loading branch information
christophd committed Mar 3, 2023
1 parent 4f1dd7b commit 2697cd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ jobs:
path: maven-repo-${{ github.run_id }}-${{ github.run_number }}.tgz
deploy:
runs-on: ubuntu-latest
# Run only when pushing to the branches (either main or release), never on merge requests
if: ${{ github.event_name == 'push' }}
# Run only when pushing to the branches (either main or release), never on merge requests and forks
if: ${{ github.repository == 'apache/camel-kamelets' }} && ${{ github.event_name == 'push' }}
env:
NEXUS_DEPLOY_USERNAME: ${{ secrets.NEXUS_USER }}
NEXUS_DEPLOY_PASSWORD: ${{ secrets.NEXUS_PW }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
java-version: 17
cache: 'maven'
- name: Build catalog 1st Run
run: ./mvnw clean install -DskipTests
run: ./mvnw clean install -DskipTests -DskipITs
- name: Build catalog 2nd Run
run: ./mvnw clean install

0 comments on commit 2697cd4

Please sign in to comment.