mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-12 05:11:56 +00:00
[workflow] fixed broken rellease workflows (#2604)
This commit is contained in:
parent
f7458d3ec7
commit
f566b0ce6b
@ -59,8 +59,7 @@ jobs:
|
|||||||
id: message-preparation
|
id: message-preparation
|
||||||
run: |
|
run: |
|
||||||
url=$SERVER_URL/$REPO/actions/runs/$RUN_ID
|
url=$SERVER_URL/$REPO/actions/runs/$RUN_ID
|
||||||
|
if [ "$STATUS" == 'success' ]
|
||||||
if [ $STATUS == 'success' ]
|
|
||||||
then
|
then
|
||||||
msg="The Docker image for the latest release has been successfully built and pushed to DockerHub."
|
msg="The Docker image for the latest release has been successfully built and pushed to DockerHub."
|
||||||
else
|
else
|
||||||
@ -73,4 +72,4 @@ jobs:
|
|||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
RUN_ID: ${{ github.run_id }}
|
RUN_ID: ${{ github.run_id }}
|
||||||
WEBHOOK_URL: ${{ secrets.LARK_NOTIFICATION_WEBHOOK_URL }}
|
WEBHOOK_URL: ${{ secrets.LARK_NOTIFICATION_WEBHOOK_URL }}
|
||||||
STATUS: ${{ steps.docker-push.outcome }}
|
STATUS: ${{ needs.release.result }}
|
||||||
|
@ -34,7 +34,7 @@ jobs:
|
|||||||
|
|
||||||
notify:
|
notify:
|
||||||
name: Notify Lark via webhook
|
name: Notify Lark via webhook
|
||||||
needs: release
|
needs: build-n-publish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
steps:
|
steps:
|
||||||
@ -52,7 +52,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
url=$SERVER_URL/$REPO/actions/runs/$RUN_ID
|
url=$SERVER_URL/$REPO/actions/runs/$RUN_ID
|
||||||
|
|
||||||
if [ $STATUS == 'success' ]
|
if [ "$STATUS" == 'success' ]
|
||||||
then
|
then
|
||||||
msg="The Colossal-AI latest version has been successfully released to PyPI."
|
msg="The Colossal-AI latest version has been successfully released to PyPI."
|
||||||
else
|
else
|
||||||
@ -65,4 +65,4 @@ jobs:
|
|||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
RUN_ID: ${{ github.run_id }}
|
RUN_ID: ${{ github.run_id }}
|
||||||
WEBHOOK_URL: ${{ secrets.LARK_NOTIFICATION_WEBHOOK_URL }}
|
WEBHOOK_URL: ${{ secrets.LARK_NOTIFICATION_WEBHOOK_URL }}
|
||||||
STATUS: ${{ steps.publish.outcome }}
|
STATUS: ${{ needs.build-n-publish.result }}
|
||||||
|
@ -57,7 +57,12 @@ def collate_release_info(commit_info_list):
|
|||||||
|
|
||||||
for commit_info in commit_info_list:
|
for commit_info in commit_info_list:
|
||||||
author = commit_info['commit']['author']['name']
|
author = commit_info['commit']['author']['name']
|
||||||
author_url = commit_info['author']['url']
|
|
||||||
|
try:
|
||||||
|
author_url = commit_info['author']['url']
|
||||||
|
except:
|
||||||
|
# author can be None
|
||||||
|
author_url = None
|
||||||
msg = commit_info['commit']['message']
|
msg = commit_info['commit']['message']
|
||||||
match = re.search(pattern, msg)
|
match = re.search(pattern, msg)
|
||||||
|
|
||||||
@ -86,7 +91,10 @@ def generate_release_post_markdown(current_version, last_version, release_info):
|
|||||||
# only keep the first line
|
# only keep the first line
|
||||||
msg = msg.split('\n')[0]
|
msg = msg.split('\n')[0]
|
||||||
|
|
||||||
item = f'{msg} by [{author}]({author_url})\n'
|
if author_url:
|
||||||
|
item = f'{msg} by [{author}]({author_url})\n'
|
||||||
|
else:
|
||||||
|
item = f'{msg} by {author}\n'
|
||||||
text.append(f'- {item}')
|
text.append(f'- {item}')
|
||||||
|
|
||||||
text.append('\n')
|
text.append('\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user