ci: build-bot 增加「开始编译」回执;macOS runner 改用 macos-latest
- 收到 @build-bot build <目标> 后立即回帖「开始编译」,附来源提交、目标、日志链接 - 编译完成仍走原来的结果回帖(成功给 release 链接,失败给日志链接) - runs-on: macos-14 → macos-latest: macos-14 在本仓库被判为 'macos-14-arm64-us-default' 不受支持,job 在启动前即被取消
This commit is contained in:
1 parent
b51ebd1a3d
commit
ab0cee8b40
2 files changed
+31
-2
No files matched your search
@@ -86,10 +86,39 @@ jobs:
|
||||
echo "ref=$REF" >> "$GITHUB_OUTPUT"
|
||||
echo "目标=$TARGET 提交=$REF 是否PR=$IS_PR"
|
||||
|
||||
- name: 回复「开始编译」
|
||||
if: steps.parse.outputs.ok == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ISSUE: ${{ github.event.issue.number }}
|
||||
TARGET: ${{ steps.parse.outputs.target }}
|
||||
REF: ${{ steps.parse.outputs.ref }}
|
||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
run: |
|
||||
set -e
|
||||
case "$TARGET" in
|
||||
mac) PLATFORMS="macOS" ;;
|
||||
win-amd) PLATFORMS="Windows amd64" ;;
|
||||
win-arm) PLATFORMS="Windows arm64" ;;
|
||||
*) PLATFORMS="macOS + Windows amd64 + Windows arm64" ;;
|
||||
esac
|
||||
|
||||
cat > ack.md <<EOF
|
||||
🔨 **开始编译**:${PLATFORMS}
|
||||
|
||||
- 来源提交:\`${REF:0:7}\`
|
||||
- 目标:\`${TARGET}\`
|
||||
- 实时日志:${RUN_URL}
|
||||
|
||||
编译完成后会在这里回复结果。
|
||||
EOF
|
||||
|
||||
gh issue comment "$ISSUE" --body-file ack.md
|
||||
|
||||
build-mac:
|
||||
needs: prepare
|
||||
if: needs.prepare.outputs.ok == 'true' && (needs.prepare.outputs.target == 'mac' || needs.prepare.outputs.target == 'all')
|
||||
runs-on: macos-14
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user