[fix] #111 loginId 가 nullable 해서 중복으로 처리되는 문제 해결 #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build and Push | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
working-directory: ./ | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
working-directory: ./ | |
- name: Build with Gradle | |
run: ./gradlew build | |
working-directory: ./ | |
env: # application.yml 에 들어갈 값 | |
DB_URL: ${{ secrets.GLOBAL_DB_URL }} | |
DB_USERNAME: ${{ secrets.GLOBAL_DB_USERNAME }} | |
DB_PASSWORD: ${{ secrets.GLOBAL_DB_PASSWORD }} | |
SERVER_URL: ${{ secrets.SERVER_URL }} | |
RESTAPI_KEY: ${{ secrets.RESTAPI_KEY }} | |
JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
ACCESS_TOKEN_EXPIRE_TIME: ${{ secrets.ACCESS_TOKEN_EXPIRE_TIME }} | |
REFRESH_TOKEN_EXPIRE_TIME: ${{ secrets.REFRESH_TOKEN_EXPIRE_TIME }} | |
REDIS_HOST: ${{ secrets.REDIS_HOST }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: spring-app-artifacts | |
path: build/libs/*.jar | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/booktalk-spring:latest | |
- name: Send Portainer restart spring-container Trigger | |
run: | | |
curl -X POST ${{ secrets.PORTAINER_WEBHOOK_LINK }} | |
- name: Clean up Gradle Cache | |
run: ./gradlew clean | |
working-directory: ./ |