32 lines
898 B
YAML
32 lines
898 B
YAML
name: Main-Build
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Maven Build WAR
|
|
run: mvn -B clean package -DskipTests
|
|
|
|
- name: Login Harbor
|
|
run: |
|
|
printf "%s" "$HARBOR_PASSWORD" | docker login harbor.sayinfo.co.kr -u "$HARBOR_USERNAME" --password-stdin
|
|
env:
|
|
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
|
|
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
|
|
|
|
- name: Build Docker image
|
|
run: |
|
|
docker build -t sayit-helpdesk:latest .
|
|
|
|
- name: Push to Harbor
|
|
run: |
|
|
docker tag sayit-helpdesk:latest harbor.sayinfo.co.kr/sayit-helpdesk-gitea_action_runner_test/helpdesk-service:latest
|
|
docker push harbor.sayinfo.co.kr/sayit-helpdesk-gitea_action_runner_test/helpdesk-service:latest
|