-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26ae24d
commit c66ce99
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test |