Skip to content

Commit

Permalink
KH-520: Introduce validate-prod only on push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliouzbett committed Jul 2, 2024
1 parent 82741b2 commit bdbf832
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@ on:
branches: [main]

jobs:
validate-pr:
if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }}
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main
with:
java-version: "8"
maven-phase: "install"
secrets:
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:
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' ? '-P prod -DskipTests': '' }}
use-secrets:
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' ? true: false }}
maven-args: "-P prod -DskipTests"
use-secrets: true
secrets:
NEXUS_USERNAME: ${{ secrets.MEKOM_NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.MEKOM_NEXUS_PASSWORD }}
Expand Down

0 comments on commit bdbf832

Please sign in to comment.