Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
JongHoooon committed Oct 3, 2024
1 parent 26ae24d commit c66ce99
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/pull-request-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Bottles Pull Request Workflow

on:
pull_request:
branches:
- develop
types: [ opened, reopened, synchronize ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
shell: bash

- name: Build with gradle
run: ./gradlew clean build
shell: bash

- name: Send Discord Notification
if: github.event.action == 'opened' || github.event.action == 'reopened'
env:
DATA: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*서버 PR* :bell: <@U07L8AX9B4N><@U07L87A3WKY>"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Author:*\n<https://github.com/${{ github.event.sender.login }}|${{ github.event.sender.login }}>"
},
{
"type": "mrkdwn",
"text": "*Title:*\n${{ github.event.pull_request.title }}"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Description:*\n${{ github.event.pull_request.body }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Pull Request URL:*\n<${{ github.event.pull_request.html_url }}|View PR>"
}
}
]
}
run: |
curl -X POST -H 'Content-type: application/json' \
-d "$DATA" \
${{ secrets.SLACK_WEBHOOK_URL }}
1 change: 1 addition & 0 deletions .github/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test

0 comments on commit c66ce99

Please sign in to comment.