Skip to content

Commit

Permalink
feat: #14 - github actions yml 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
2522001 committed May 21, 2024
1 parent df63611 commit 1c907c5
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: issue-tracking-system CI/CD

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'

- name: Set up environment variables
run: |
echo "DB_URL=${{ secrets.DB_URL }}" >> $GITHUB_ENV
echo "DB_USERNAME=${{ secrets.DB_USERNAME }}" >> $GITHUB_ENV
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> $GITHUB_ENV
- name: Build with Gradle
run: ./gradlew build

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker image
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/issue-tracking-system:latest .

- name: Push Docker image
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/issue-tracking-system:latest

0 comments on commit 1c907c5

Please sign in to comment.