test new notification #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build cips@nyist dev ver. | ||
on: | ||
push: | ||
branches: [ "nyist-pxe-dev" ] | ||
pull_request: | ||
branches: [ "nyist-pxe-dev" ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Send start notification to WeCom | ||
uses: chf007/action-wechat-work@master | ||
env: | ||
WECHAT_WORK_BOT_WEBHOOK: ${{ secrets.WECHAT_WEBHOOK_URL }} | ||
with: | ||
#msgtype: text | ||
#content: "NYIST-CIPS/netboot 🔱nyist-pxe-dev 测试构建已开始🚀" | ||
msgtype: template_card | ||
template_card: '{"msgtype":"template_card","template_card":{"card_type":"news_notice","source":{"icon_url":"https://github.githubassets.com/favicons/favicon-dark.png","desc":"GitHub Actions 自动通知","desc_color":0},"main_title":{"title":"${{GITHUB_REPOSITORY}} 🔱${{GITHUB_REF_NAME}}工作流已启动🚀","desc":" 当前事件:${{GITHUB_EVENT_NAME}} "},"card_image":{"url":"https://gh-card.dev/repos/${{GITHUB_REPOSITORY}}.png","aspect_ratio":2.25},"image_text_area":{"type":1,"url":"https://github.com/${{GITHUB_REPOSITORY}}/commit/${{GITHUB_WORKFLOW_SHA}}","title":"${{GITHUB_ACTOR}}","desc":"${{GITHUB_WORKFLOW_SHA}}","image_url":"https://avatars.githubusercontent.com/u/${{GITHUB_ACTOR_ID}}"},"vertical_content_list":[{"title":"Actions已开始执行","desc":"敬请关注后续提示"}],"horizontal_content_list":[{"keyname":"Actions发起人","value":"${{GITHUB_TRIGGERING_ACTOR}}"},{"keyname":"Actions ID","value":"${{GITHUB_RUN_ID}}","type":1,"url":"https://github.com/${{GITHUB_REPOSITORY}}/actions/runs/${{GITHUB_RUN_ID}}"},{"keyname":"构建成果","value":"请稍后","type":2,"media_id":"1"}],"jump_list":[{"type":1,"url":"https://github.com/${{GITHUB_REPOSITORY}}","title":"${{GITHUB_REPOSITORY}} 仓库页面"}],"card_action":{"type":1,"url":"https://work.weixin.qq.com/?from=openApi","appid":"APPID","pagepath":"PAGEPATH"}}}' | ||
Check failure on line 26 in .github/workflows/build-dev.yml GitHub Actions / Build cips@nyist dev ver.Invalid workflow file
|
||
- name: Build the Docker image | ||
run: docker build -t localbuild -f Dockerfile . | ||
- name: Build site | ||
run: docker run --rm -v $(pwd):/buildout localbuild | ||
- name: Copy pxe background image | ||
run: cp pxe_bg.png buildout/ | ||
- name: Create buildout archive | ||
run: | | ||
cd buildout | ||
zip -r buildout.zip . | ||
- name: Upload buildout artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: buildout-artifact | ||
path: buildout/buildout.zip | ||
- name: Send end notification to WeCom | ||
uses: chf007/action-wechat-work@master | ||
env: | ||
WECHAT_WORK_BOT_WEBHOOK: ${{ secrets.WECHAT_WEBHOOK_URL }} | ||
with: | ||
msgtype: text | ||
content: "NYIST-CIPS/netboot 🔱nyist-pxe-dev 测试构建成功✨" |