Skip to content

Commit 276d14c

Browse files
authored
Update update_challenge_progress.yml
1 parent 6cebc7d commit 276d14c

File tree

1 file changed

+57
-45
lines changed

1 file changed

+57
-45
lines changed

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

Lines changed: 57 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
types:
66
- closed
7+
workflow_dispatch:
78

89
jobs:
910
update_progress:
@@ -45,7 +46,18 @@ jobs:
4546
cd _MonthlyChallenges
4647
git add scoreboard.json DASHBOARD.md HISTORY.md
4748
git commit -m "Update challenge progress dashboard" || echo "No changes to commit"
48-
git push origin main
49+
50+
- name: Create Pull Request
51+
uses: peter-evans/create-pull-request@v5
52+
with:
53+
commit-message: "Update challenge progress dashboard"
54+
title: "์ž๋™ PR: ์ฑŒ๋ฆฐ์ง€ ์ง„ํ–‰ ์ƒํ™ฉ ๊ฐฑ์‹ "
55+
body: |
56+
This pull request was automatically generated by the workflow.
57+
branch: auto/update-dashboard
58+
base: main
59+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
60+
4961

5062
- name: Post PR Comment with progress
5163
if: github.event_name == 'pull_request'
@@ -65,50 +77,50 @@ jobs:
6577
body: dashboard
6678
});
6779
68-
notify_discord:
69-
needs: update_progress
70-
runs-on: ubuntu-latest
71-
steps:
72-
- name: Checkout Repository
73-
uses: actions/checkout@v3
74-
with:
75-
fetch-depth: 0
76-
ref: main
80+
# notify_discord:
81+
# needs: update_progress
82+
# runs-on: ubuntu-latest
83+
# steps:
84+
# - name: Checkout Repository
85+
# uses: actions/checkout@v3
86+
# with:
87+
# fetch-depth: 0
88+
# ref: main
7789

78-
- name: Send Dashboard to Discord
79-
working-directory: _MonthlyChallenges
80-
run: |
81-
# DASHBOARD.md ํŒŒ์ผ์„ ์•ˆ์ „ํ•˜๊ฒŒ JSON ๋ฌธ์ž์—ด๋กœ ์ด์Šค์ผ€์ดํ”„
82-
DASHBOARD_CONTENT=$(jq -R -s '.' DASHBOARD.md)
83-
echo "Dashboard content: $DASHBOARD_CONTENT"
90+
# - name: Send Dashboard to Discord
91+
# working-directory: _MonthlyChallenges
92+
# run: |
93+
# # DASHBOARD.md ํŒŒ์ผ์„ ์•ˆ์ „ํ•˜๊ฒŒ JSON ๋ฌธ์ž์—ด๋กœ ์ด์Šค์ผ€์ดํ”„
94+
# DASHBOARD_CONTENT=$(jq -R -s '.' DASHBOARD.md)
95+
# echo "Dashboard content: $DASHBOARD_CONTENT"
8496

85-
# Discord ์ž„๋ฒ ๋“œ ๋ฉ”์‹œ์ง€ JSON ์ƒ์„ฑ
86-
EMBED_JSON=$(cat <<EOF
87-
{
88-
"content": "",
89-
"embeds": [
90-
{
91-
"author": {
92-
"name": "Allumbus๐Ÿ”ฅ",
93-
"url": "https://github.com/AlgorithmStudy-Allumbus",
94-
"icon_url": "https://imgur.com/kKJg6v3.jpg"
95-
},
96-
"title": "**๐Ÿ“Š ์ฑŒ๋ฆฐ์ง€ ์ง„ํ–‰ ์ƒํ™ฉ**",
97-
"url": "https://github.com/AlgorithmStudy-Allumbus/codingtest_algorithm_study/blob/main/_MonthlyChallenges/DASHBOARD.md",
98-
"description": ${DASHBOARD_CONTENT},
99-
"color": 15258703,
100-
"footer": {
101-
"text": "Updated on $(date '+%Y-%m-%d %H:%M:%S')"
102-
}
103-
}
104-
]
105-
}
106-
EOF
107-
)
108-
echo "Embed JSON: $EMBED_JSON"
97+
# # Discord ์ž„๋ฒ ๋“œ ๋ฉ”์‹œ์ง€ JSON ์ƒ์„ฑ
98+
# EMBED_JSON=$(cat <<EOF
99+
# {
100+
# "content": "",
101+
# "embeds": [
102+
# {
103+
# "author": {
104+
# "name": "Allumbus๐Ÿ”ฅ",
105+
# "url": "https://github.com/AlgorithmStudy-Allumbus",
106+
# "icon_url": "https://imgur.com/kKJg6v3.jpg"
107+
# },
108+
# "title": "**๐Ÿ“Š ์ฑŒ๋ฆฐ์ง€ ์ง„ํ–‰ ์ƒํ™ฉ**",
109+
# "url": "https://github.com/AlgorithmStudy-Allumbus/codingtest_algorithm_study/blob/main/_MonthlyChallenges/DASHBOARD.md",
110+
# "description": ${DASHBOARD_CONTENT},
111+
# "color": 15258703,
112+
# "footer": {
113+
# "text": "Updated on $(date '+%Y-%m-%d %H:%M:%S')"
114+
# }
115+
# }
116+
# ]
117+
# }
118+
# EOF
119+
# )
120+
# echo "Embed JSON: $EMBED_JSON"
109121

110-
# Discord ์›นํ›… ํ˜ธ์ถœ (๋””๋ฒ„๊ทธ๋ฅผ ์œ„ํ•ด -v ์˜ต์…˜ ์‚ฌ์šฉ)
111-
curl -v -H "Content-Type: application/json" \
112-
-X POST \
113-
-d "$EMBED_JSON" \
114-
"${{ secrets.DISCORD_WEBHOOK_URL }}"
122+
# # Discord ์›นํ›… ํ˜ธ์ถœ (๋””๋ฒ„๊ทธ๋ฅผ ์œ„ํ•ด -v ์˜ต์…˜ ์‚ฌ์šฉ)
123+
# curl -v -H "Content-Type: application/json" \
124+
# -X POST \
125+
# -d "$EMBED_JSON" \
126+
# "${{ secrets.DISCORD_WEBHOOK_URL }}"

0 commit comments

Comments
ย (0)