Skip to content

Main CI

Main CI #7

Workflow file for this run

name: Build CI
on:
pull_request_target:
branches: [ main ]
workflow_dispatch:
jobs:
prt_build_and_upload:
runs-on: ubuntu-latest
steps:
- name: Checking out PR code
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '0'
# This is to get the PR code instead of the repo code
ref: ${{ github.event.pull_request.head.sha }}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
name: Checking out main code
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '0'
- name: Building ...
run: |
java -version
mvn -version
#apt-get update ; apt-get install maven default-jdk -y ; update-alternatives --config javac
mvn clean package
ls -l target/*.war
#env:
# PR_TITLE: ${{github.event.pull_request.title}}