Merge pull request 'feature/git-action5' (#18) from feature/git-action5 into master
Some checks failed
Main-Build / build-and-push (push) Failing after 19s
Some checks failed
Main-Build / build-and-push (push) Failing after 19s
Reviewed-on: #18 Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
This commit is contained in:
@@ -2,55 +2,27 @@ name: Main-Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: ["master"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
container:
|
|
||||||
image: ci-maven-node:1.0
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up JDK 8
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "8"
|
|
||||||
|
|
||||||
- name: Maven Build WAR
|
- name: Maven Build WAR
|
||||||
run: mvn -B clean package -DskipTests
|
run: mvn -B clean package -DskipTests
|
||||||
|
|
||||||
# ------------------------------
|
- name: Login Harbor
|
||||||
# 🔻 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: |
|
run: |
|
||||||
docker build -t sayit-helpdesk:local-test .
|
echo "${{ secrets.HARBOR_PASSWORD }}" | docker login harbor.sayinfo.co.kr -u ${{ secrets.HARBOR_USERNAME }} --password-stdin
|
||||||
|
|
||||||
- name: Done
|
- name: Build Docker image
|
||||||
run: echo "Main branch build completed (Harbor push disabled)."
|
run: |
|
||||||
|
docker build -t sayit-helpdesk:latest .
|
||||||
|
|
||||||
|
- name: Push to Harbor
|
||||||
|
run: |
|
||||||
|
docker tag sayit-helpdesk:latest harbor.sayinfo.co.kr/helpdesk/helpdesk-service:latest
|
||||||
|
docker push harbor.sayinfo.co.kr/helpdesk/helpdesk-service:latest
|
||||||
|
|||||||
@@ -2,33 +2,15 @@ name: PR-CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize] # PR 생성 + 커밋 push 때만 실행
|
types: [opened, synchronize]
|
||||||
branches: ["master"]
|
branches: ["master"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test:
|
build-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
container:
|
|
||||||
image: ci-maven-node:1.0
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up JDK 8
|
- name: Maven Build (skip tests)
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "8"
|
|
||||||
|
|
||||||
- name: Cache Maven repo
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.m2
|
|
||||||
key: m2-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
|
|
||||||
restore-keys: |
|
|
||||||
m2-${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Maven Build (compile + dependency check)
|
|
||||||
run: mvn -B clean package -DskipTests
|
run: mvn -B clean package -DskipTests
|
||||||
|
|||||||
Reference in New Issue
Block a user