Skip to content

[Feature/21] 받은 보틀 목록 조회 API를 구현한다 #35

[Feature/21] 받은 보틀 목록 조회 API를 구현한다

[Feature/21] 받은 보틀 목록 조회 API를 구현한다 #35

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: 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: |
{
"content": "<@&${{ secrets.DISCORD_ROLE_ID }}>",
"embeds": [
{
"author": {
"name": ${{ toJson(github.event.sender.login) }},
"url": "https://github.com/${{ github.event.sender.login }}",
"icon_url": ${{ toJson(github.event.sender.avatar_url) }}
},
"title": ${{ toJson(github.event.pull_request.title) }},
"description": ${{ toJson(github.event.pull_request.body) }},
"url": ${{ toJson(github.event.pull_request.html_url) }},
"color": 65280
}
]
}
run: |
curl -X POST -H 'Content-type: application/json' \
-d "$DATA" \
${{ secrets.DISCORD_WEBHOOK_URL }}