Skip to content

[chore] URL 변경사항 롤백 #39

[chore] URL 변경사항 롤백

[chore] URL 변경사항 롤백 #39

Workflow file for this run

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 }}
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}}
- 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: ./