KH-520: Fix failing builds on PR from forked repositories #133
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
release: | |
types: [published] | |
jobs: | |
validate-pr: | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main | |
with: | |
java-version: "8" | |
maven-phase: "install" | |
secrets: # We don't the secrets here. we make them not required. | |
NEXUS_USERNAME: ${{ secrets.MEKOM_NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.MEKOM_NEXUS_PASSWORD }} | |
validate: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main | |
with: | |
java-version: "8" | |
maven-phase: "install" | |
maven-args: "-P prod -DskipTests" | |
use-secrets: true | |
secrets: | |
NEXUS_USERNAME: ${{ secrets.MEKOM_NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.MEKOM_NEXUS_PASSWORD }} | |
release: | |
needs: validate | |
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-publish.yml@main | |
with: | |
java-version: "8" | |
maven-args: "-P prod -DskipTests" | |
secrets: | |
NEXUS_USERNAME: ${{ secrets.MEKOM_NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.MEKOM_NEXUS_PASSWORD }} |