docs: 아키텍처 수정 #18
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: githubAction | |
on: | |
push: | |
branches: | |
- develop | |
env: | |
NAME: stock-service | |
REPO: investing-stock-service | |
working-directory: ./stock-service | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
mongodb-version: [ '6.0' ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 자바 17를 설치합니다. | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: 몽고디비를 설치한다. | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
mongodb-db: investing | |
- name: Gradle 명령 실행을 위한 권한을 부여합니다 | |
run: chmod +x gradlew | |
working-directory: ${{ env.working-directory }} | |
- name: 그래들 빌드를 실행한다. | |
run: ./gradlew build | |
working-directory: ${{ env.working-directory }} | |
- name: 도커허브에 로그인한다. | |
uses: docker/login-action@v1 | |
with: | |
username: ${{secrets.DOCKERHUB_USERNAME}} | |
password: ${{secrets.DOCKERHUB_TOKEN}} | |
- name: 도커 빌드 | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./stock-service | |
file: ./stock-service/Dockerfile | |
push: true | |
tags: ${{secrets.DOCKERHUB_USERNAME}}/${{env.REPO}}:latest |