This repository was archived by the owner on Sep 16, 2024. It is now read-only.
[Fix] CD 워크플로 & 탬플릿 미세 조정 (#47) #5
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: Continuous Delivery | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
Delivery: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set up sources | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
submodules: true | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: corretto | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Execute Gradle build | |
run: ./gradlew build | |
- name: Login to docker-hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build Docker Image | |
run: docker build --tag goldentrash/plantory:latest . | |
- name: Push docker image | |
run: docker push goldentrash/plantory:latest |