Skip to content

[Cicd/9] CI Github Action ํ™œ์šฉํ•ด์„œ docker hub์— ์ž๋™์œผ๋กœ pushํ•˜๊ธฐ #21

[Cicd/9] CI Github Action ํ™œ์šฉํ•ด์„œ docker hub์— ์ž๋™์œผ๋กœ pushํ•˜๊ธฐ

[Cicd/9] CI Github Action ํ™œ์šฉํ•ด์„œ docker hub์— ์ž๋™์œผ๋กœ pushํ•˜๊ธฐ #21

Workflow file for this run

name: Java CI with Gradle & Docker
on:
push:
branches: [ "develop", "feat/*", "cicd/*", "fix/*", "hotfix/*", "refactor/*", "chore/*", "docs/*", "style/*", "test/*" ]
pull_request:
branches: [ "develop", "feat/*", "cicd/*", "fix/*", "hotfix/*", "refactor/*", "chore/*", "docs/*", "style/*", "test/*" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Checkout
uses: actions/checkout@v3
# Spring Boot ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ Build (1)
- name: Spring Boot Build
run: ./gradlew clean build -x test --warning-mode=all --stacktrace
# Docker ์ด๋ฏธ์ง€ Build (2)
- name: docker image build
run: docker build -t rimi3226/gamegoo .
# DockerHub Login (3)
- name: docker login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PW }}
# Docker Hub push (4)
- name: docker Hub push
run: docker push rimi3226/gamegoo