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 25670ea commit 4b3627d
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 @@ -9,15 +9,24 @@ on:
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:
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 4b3627d

Please sign in to comment.