Skip to content

Commit

Permalink
[✨Feat]: Create gradle.yml
Browse files Browse the repository at this point in the history
GitHub Actions으로 docker, Ec2 무중단 배포 설정
  • Loading branch information
rimi3226 authored Mar 27, 2024
1 parent 7072944 commit e0625d5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

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: Checkout
uses: actions/checkout@v3

# Spring Boot 어플리케이션 Build (1)
- name: Spring Boot Build
run: ./gradlew clean build --exclude-task test

# 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_TOKEN }}

# Docker Hub push (4)
- name: docker Hub push
run: docker push rimi3226/gamegoo

0 comments on commit e0625d5

Please sign in to comment.