Skip to content

Commit

Permalink
Create cicd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
leesj000603 authored Oct 9, 2024
1 parent 9b7c4e0 commit 80a43ce
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: develop branch bluegreen deployment

on:
push:
branches: [ "develop" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle Wrapper
run: ./gradlew -x test bootJar

- name: Set up Docker Build
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}



- name: Build and push Docker image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/rankitrun-be:latest .
docker push ${{ secrets.DOCKER_USERNAME }}/rankitrun-be:latest

0 comments on commit 80a43ce

Please sign in to comment.