58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
name: Main-Build
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: ci-maven-node:1.0
|
|
options: >-
|
|
--add-host nexus.sayinfo.co.kr:10.1.20.50
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 8
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: "8"
|
|
|
|
- name: Maven Build WAR
|
|
run: mvn -B clean package -DskipTests
|
|
|
|
# ------------------------------
|
|
# 🔻 Harbor 관련 기능 임시 비활성화
|
|
# ------------------------------
|
|
|
|
# - name: Docker login to Harbor
|
|
# run: |
|
|
# echo "${{ secrets.HARBOR_PASSWORD }}" | docker login harbor.sayinfo.co.kr -u ${{ secrets.HARBOR_USERNAME }} --password-stdin
|
|
|
|
# - name: Build Docker image
|
|
# run: |
|
|
# docker build -t sayit-helpdesk:latest .
|
|
|
|
# - name: Tag image for Harbor
|
|
# run: |
|
|
# docker tag sayit-helpdesk:latest harbor.sayinfo.co.kr/helpdesk/helpdesk-service:latest
|
|
|
|
# - name: Push image to Harbor
|
|
# run: |
|
|
# docker push harbor.sayinfo.co.kr/helpdesk/helpdesk-service:latest
|
|
|
|
# ------------------------------
|
|
# 끝 (Harbor 비활성화)
|
|
# ------------------------------
|
|
|
|
- name: Build Docker image (local only, no push)
|
|
run: |
|
|
docker build -t sayit-helpdesk:local-test .
|
|
|
|
- name: Done
|
|
run: echo "Main branch build completed (Harbor push disabled)."
|