55 workflow_dispatch :
66 inputs :
77 description :
8- description : ' Description for the sync action'
8+ description : " Description for the sync action"
99 required : false
1010 slack_user :
11- description : ' Slack user ID to notify (e.g., U123456)'
11+ description : " Slack user ID to notify (e.g., U123456)"
1212 required : false
1313 # 外部 dispatch 触发
1414 repository_dispatch :
1515 types : [sync-icons]
1616 # 定时执行:每天 UTC 时间 0:00(北京时间 8:00)
1717 schedule :
18- - cron : ' 0 0 * * *'
18+ - cron : " 0 0 * * *"
1919
2020jobs :
2121 sync-icon :
2222 runs-on : ubuntu-latest
2323 strategy :
2424 matrix :
25- node : [20 ]
25+ node : [24 ]
2626 steps :
2727 - name : Checkout repository
2828 uses : actions/checkout@v4
2929 - name : Setup node
30- uses : actions/setup-node@v3
30+ uses : actions/setup-node@v4
3131 with :
3232 node-version : ${{ matrix.node }}
3333 cache : " yarn"
@@ -42,12 +42,12 @@ jobs:
4242 uses : peter-evans/create-pull-request@v5
4343 with :
4444 token : ${{ secrets.GITHUB_TOKEN }}
45- commit-message : ' [SYNC-ICON]: update icons'
45+ commit-message : " [SYNC-ICON]: update icons"
4646 committer : netweng <xiaojun@smartx.com>
4747 author : netweng <xiaojun@smartx.com>
4848 delete-branch : true
4949 branch-suffix : short-commit-hash
50- title : ' [SYNC-ICON]: update icons'
50+ title : " [SYNC-ICON]: update icons"
5151 labels : feat
5252 body : |
5353 Sync Icons from figma
7575 PR_URL="${{ steps.cpr.outputs.pull-request-url }}"
7676 PR_NUMBER="${{ steps.cpr.outputs.pull-request-number }}"
7777 SLACK_USER_MENTION="${{ steps.set_slack_user.outputs.slack_user_mention }}"
78-
78+
7979 TEXT="🎨 Icons Synced! New PR created: <${PR_URL}|#${PR_NUMBER}>\n${DESCRIPTION} ${SLACK_USER_MENTION}"
80-
80+
8181 PAYLOAD=$(jq -n --arg text "$TEXT" '{text: $text}')
8282 echo "payload<<EOF" >> $GITHUB_OUTPUT
8383 echo "$PAYLOAD" >> $GITHUB_OUTPUT
0 commit comments