我有一个GitHub Actions工作流程,用于运行测试,但现在我正在集成Slack通知。我想要获取运行测试
步骤的输出,并将其作为消息发送到Slack步骤中。
- name: Run tests
run: |
mix compile --warnings-as-errors
mix format --check-formatted
mix ecto.create
mix ecto.migrate
mix test
env:
MIX_ENV: test
PGHOST: localhost
PGUSER: postgres
- name: Slack Notification
uses: rtCamp/action-slack-notify@master
env:
SLACK_MESSAGE: Run tests output
SLACK_TITLE: CI Test Suite
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
pullreminders/slack-action
。 - Kevin Gwynnset-output
命令:https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/。 - Rafael Membrives$env:GITHUB_OUTPUT
,否则评估输出变量的下一步将会失败。 - Antebios