Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] pr을 보낼 때는 CI를 수행하고, 성공적으로 merge가 될 때 CD까지 수행한다. (#98) #103

Merged
merged 7 commits into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/pr_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Darass PR Checker

on:
pull_request:
branches: [ develop/be ]

jobs:
build:

runs-on: self-hosted

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
token: ${{ secrets.MY_REPO_PAT }}
submodules: recursive

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: ./backend

- name: Build with Gradle
run: ./gradlew clean build
working-directory: ./backend

- name: build result to slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo, message, commit, author, action, eventName, ref, workflow, job, took
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle
name: Darass Push Builder

on:
push:
branches: [ develop/be ]
pull_request:
branches: [ develop/be ]

jobs:
build:
Expand All @@ -34,7 +32,7 @@ jobs:
- name: Build with Gradle
run: ./gradlew clean build
working-directory: ./backend

- name: Copy built project
if: success()
uses: appleboy/scp-action@master
Expand Down Expand Up @@ -67,7 +65,7 @@ jobs:
mv workspace 2021-darass
cd 2021-darass/backend
docker-compose up --build -d

- name: build result to slack
uses: 8398a7/action-slack@v3
with:
Expand Down