Skip to content

Commit 4dbe128

Browse files
authored
Update update_challenge_progress.yml
1 parent e1faee2 commit 4dbe128

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

โ€Ž.github/workflows/update_challenge_progress.ymlโ€Ž

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -78,50 +78,50 @@ jobs:
7878
body: dashboard
7979
});
8080
81-
# notify_discord:
82-
# needs: update_progress
83-
# runs-on: ubuntu-latest
84-
# steps:
85-
# - name: Checkout Repository
86-
# uses: actions/checkout@v3
87-
# with:
88-
# fetch-depth: 0
89-
# ref: main
81+
notify_discord:
82+
needs: update_progress
83+
runs-on: ubuntu-latest
84+
steps:
85+
- name: Checkout Repository
86+
uses: actions/checkout@v3
87+
with:
88+
fetch-depth: 0
89+
ref: main
9090

91-
# - name: Send Dashboard to Discord
92-
# working-directory: _MonthlyChallenges
93-
# run: |
94-
# # DASHBOARD.md ํŒŒ์ผ์„ ์•ˆ์ „ํ•˜๊ฒŒ JSON ๋ฌธ์ž์—ด๋กœ ์ด์Šค์ผ€์ดํ”„
95-
# DASHBOARD_CONTENT=$(jq -R -s '.' DASHBOARD.md)
96-
# echo "Dashboard content: $DASHBOARD_CONTENT"
91+
- name: Send Dashboard to Discord
92+
working-directory: _MonthlyChallenges
93+
run: |
94+
# DASHBOARD.md ํŒŒ์ผ์„ ์•ˆ์ „ํ•˜๊ฒŒ JSON ๋ฌธ์ž์—ด๋กœ ์ด์Šค์ผ€์ดํ”„
95+
DASHBOARD_CONTENT=$(jq -R -s '.' DASHBOARD.md)
96+
echo "Dashboard content: $DASHBOARD_CONTENT"
9797
98-
# # Discord ์ž„๋ฒ ๋“œ ๋ฉ”์‹œ์ง€ JSON ์ƒ์„ฑ
99-
# EMBED_JSON=$(cat <<EOF
100-
# {
101-
# "content": "",
102-
# "embeds": [
103-
# {
104-
# "author": {
105-
# "name": "Allumbus๐Ÿ”ฅ",
106-
# "url": "https://github.com/AlgorithmStudy-Allumbus",
107-
# "icon_url": "https://imgur.com/kKJg6v3.jpg"
108-
# },
109-
# "title": "**๐Ÿ“Š ์ฑŒ๋ฆฐ์ง€ ์ง„ํ–‰ ์ƒํ™ฉ**",
110-
# "url": "https://github.com/AlgorithmStudy-Allumbus/codingtest_algorithm_study/blob/main/_MonthlyChallenges/DASHBOARD.md",
111-
# "description": ${DASHBOARD_CONTENT},
112-
# "color": 15258703,
113-
# "footer": {
114-
# "text": "Updated on $(date '+%Y-%m-%d %H:%M:%S')"
115-
# }
116-
# }
117-
# ]
118-
# }
119-
# EOF
120-
# )
121-
# echo "Embed JSON: $EMBED_JSON"
98+
# Discord ์ž„๋ฒ ๋“œ ๋ฉ”์‹œ์ง€ JSON ์ƒ์„ฑ
99+
EMBED_JSON=$(cat <<EOF
100+
{
101+
"content": "",
102+
"embeds": [
103+
{
104+
"author": {
105+
"name": "Allumbus๐Ÿ”ฅ",
106+
"url": "https://github.com/AlgorithmStudy-Allumbus",
107+
"icon_url": "https://imgur.com/kKJg6v3.jpg"
108+
},
109+
"title": "**๐Ÿ“Š ์ฑŒ๋ฆฐ์ง€ ์ง„ํ–‰ ์ƒํ™ฉ**",
110+
"url": "https://github.com/AlgorithmStudy-Allumbus/codingtest_algorithm_study/blob/main/_MonthlyChallenges/DASHBOARD.md",
111+
"description": ${DASHBOARD_CONTENT},
112+
"color": 15258703,
113+
"footer": {
114+
"text": "Updated on $(date '+%Y-%m-%d %H:%M:%S')"
115+
}
116+
}
117+
]
118+
}
119+
EOF
120+
)
121+
echo "Embed JSON: $EMBED_JSON"
122122
123-
# # Discord ์›นํ›… ํ˜ธ์ถœ (๋””๋ฒ„๊ทธ๋ฅผ ์œ„ํ•ด -v ์˜ต์…˜ ์‚ฌ์šฉ)
124-
# curl -v -H "Content-Type: application/json" \
125-
# -X POST \
126-
# -d "$EMBED_JSON" \
127-
# "${{ secrets.DISCORD_WEBHOOK_URL }}"
123+
# Discord ์›นํ›… ํ˜ธ์ถœ (๋””๋ฒ„๊ทธ๋ฅผ ์œ„ํ•ด -v ์˜ต์…˜ ์‚ฌ์šฉ)
124+
curl -v -H "Content-Type: application/json" \
125+
-X POST \
126+
-d "$EMBED_JSON" \
127+
"${{ secrets.DISCORD_WEBHOOK_URL }}"

0 commit comments

Comments
ย (0)