Skip to content

Commit

Permalink
Update test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo-Messi authored Jul 18, 2024
1 parent 5c2ac06 commit 88045b8
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ jobs:
- name: Translate job status to Chinese
id: translate-status
run: |
if [ "${{ job.status }}" == "success" ]; then
echo "translated_status=成功" >> $GITHUB_ENV
elif [ "${{ job.status }}" == "failure" ]; then
echo "translated_status=失败" >> $GITHUB_ENV
elif [ "${{ job.status }}" == "cancelled" ]; then
echo "translated_status=取消" >> $GITHUB_ENV
else
echo "translated_status=未知" >> $GITHUB_ENV
fi
case "${{ job.status }}" in
success) translated_status="成功" ;;
failure) translated_status="失败" ;;
cancelled) translated_status="取消" ;;
*) translated_status="未知" ;;
esac
echo "translated_status=$translated_status" >> $GITHUB_ENV
- name: Notify job status
if: always() # 确保这一步始终运行,不管之前的步骤是否成功
Expand Down

0 comments on commit 88045b8

Please sign in to comment.