Skip to content

๐Ÿ’„[Design] ๋ชจ์ž„ ์นด๋“œ, ๋ฒ„ํŠผ ํ˜ธ๋ฒ„ ํšจ๊ณผ ์ ์šฉ (#324) #367

๐Ÿ’„[Design] ๋ชจ์ž„ ์นด๋“œ, ๋ฒ„ํŠผ ํ˜ธ๋ฒ„ ํšจ๊ณผ ์ ์šฉ (#324)

๐Ÿ’„[Design] ๋ชจ์ž„ ์นด๋“œ, ๋ฒ„ํŠผ ํ˜ธ๋ฒ„ ํšจ๊ณผ ์ ์šฉ (#324) #367

Workflow file for this run

name: CI
on:
pull_request:
branches:
- '**'
- '!main'
push:
branches:
- develop
jobs:
ci:
name: Lint, Test, and Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run lint
- name: Run Tests
run: npm test
- name: Build Next.js app
run: npm run build
- name: Build Storybook
run: npm run build-storybook
notify-discord:
needs: ci
runs-on: ubuntu-latest
if: success()
steps:
- name: Send Discord Notification
env:
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
DATA: >
{
"embeds": [
{
"title": "${{
format('{0}',
(github.base_ref == 'develop' || github.ref_name == 'develop')
&& '๐Ÿš€ Develop ๋ธŒ๋žœ์น˜ CI ์•Œ๋ฆผ'
|| '๐ŸŽ‰ ์ƒˆ ์ž‘์—… CI ์•Œ๋ฆผ'
)
}}",
"description": "${{
format('{0}',
github.event_name == 'pull_request'
&& (github.base_ref == 'develop'
&& format('Develop ๋ธŒ๋žœ์น˜๋กœ ์ƒˆ๋กœ์šด PR์ด ๋“ฑ๋ก๋˜์—ˆ์Šต๋‹ˆ๋‹ค! ({0} โ†’ develop)', github.head_ref)
|| format('์ƒˆ๋กœ์šด PR์ด ๋“ฑ๋ก๋˜์—ˆ์Šต๋‹ˆ๋‹ค! ({0} โ†’ {1})', github.head_ref, github.base_ref)
)
|| 'Develop ๋ธŒ๋žœ์น˜์— Push๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!'
)
}}",
"url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
"color": 5814783,
"fields": [
{
"name": "Repository",
"value": "${{ github.repository }}"
},
{
"name": "Branch",
"value": "${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}"
}
]
}
]
}
run: |
curl -X POST \
-H "Content-Type: application/json" \
-d "$DATA" \
$WEBHOOK_URL