GitHub Actions、便利で最近自動でプロイするのに使ってるけど、 失敗時のみメール通知なので、デプロイ成功したかを見にいかないといけない。。 Slackでうまくできないかなと思ってたら、便利なライブラリがあるらしい。 ・rtCamp/action-slack-notify: GitHub Action for sending a notification to a Slack channel 使い方 .yamlファイルはこんな感じ。 name: Slack Notification Samle "on": push env: # 環境変数にWebhookのURLを設定 SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} jobs: build_and_deploy_prod: runs-on: ubuntu-latest steps:
![GitHub Actionsでデプロイの成功/失敗をSlackに通知する - くらげになりたい。](https://cdn-ak-scissors.b.st-hatena.com/image/square/48767aea8e8219245f76dddf5676a42e01bba60d/height=288;version=1;width=512/https%3A%2F%2Fuser-images.githubusercontent.com%2F4115%2F54997488-d1f94e00-4ff1-11e9-897f-a35ab90f525f.png)