diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-19 03:14:18 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-19 03:14:19 +0900 |
commit | e139d27748a0548c0ae10fb483c7389caacd4b3d (patch) | |
tree | e47ff7bf47d594a13c6d3f76d99841158ba4ad99 /.github/workflows | |
parent | aa5fbb5a7661fa5329881415e65a24151507e69a (diff) | |
download | ruby-e139d27748a0548c0ae10fb483c7389caacd4b3d.tar.gz |
Make Slack notification available
for macOS / Windows as well.
Docker-based GitHub Action does not work on these OSes.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/macos.yml | 16 | ||||
-rw-r--r-- | .github/workflows/ubuntu.yml | 16 | ||||
-rw-r--r-- | .github/workflows/windows.yml | 16 |
3 files changed, 30 insertions, 18 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d974a9f7ad..0b09c21e93 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -49,13 +49,17 @@ jobs: MSPECOPT: "-ff" # not using `-j` because sometimes `mspec -j` silently dies - name: Leaked Globals run: make -s leaked-globals - - uses: ./.github/actions/notify-slack + - uses: k0kubun/action-slack@v1.0.0 with: - status: ${{ job.status }} - matrix_name: ${{ matrix.test_task }} - committer_name: ${{ github.event.head_commit.committer.name }} - commit_message: ${{ github.event.head_commit.message }} - commit_timestamp: ${{ github.event.head_commit.timestamp }} + payload: | + { + "attachments": [{ + "title": "${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}", + "title_link": "https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks", + "text": "${{ github.repository }}@${{ github.ref }}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>\nby ${{ github.event.head_commit.committer.name }} on ${{ github.event.head_commit.timestamp }}: ${{ github.event.head_commit.message }}", + "color": "danger" + }] + } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} if: failure() && github.event_name == 'push' diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 31fba17aac..46a693e559 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -52,13 +52,17 @@ jobs: MSPECOPT: "-ff" # not using `-j` because sometimes `mspec -j` silently dies - name: Leaked Globals run: make -s leaked-globals - - uses: ./.github/actions/notify-slack + - uses: k0kubun/action-slack@v1.0.0 with: - status: ${{ job.status }} - matrix_name: ${{ matrix.test_task }} - committer_name: ${{ github.event.head_commit.committer.name }} - commit_message: ${{ github.event.head_commit.message }} - commit_timestamp: ${{ github.event.head_commit.timestamp }} + payload: | + { + "attachments": [{ + "title": "${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}", + "title_link": "https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks", + "text": "${{ github.repository }}@${{ github.ref }}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>\nby ${{ github.event.head_commit.committer.name }} on ${{ github.event.head_commit.timestamp }}: ${{ github.event.head_commit.message }}", + "color": "danger" + }] + } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} if: failure() && github.event_name == 'push' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ae5d2e5451..eb19e81457 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -53,13 +53,17 @@ jobs: run: | call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat" nmake ${{ matrix.test_task }} - - uses: ./.github/actions/notify-slack + - uses: k0kubun/action-slack@v1.0.0 with: - status: ${{ job.status }} - matrix_name: ${{ matrix.test_task }} - committer_name: ${{ github.event.head_commit.committer.name }} - commit_message: ${{ github.event.head_commit.message }} - commit_timestamp: ${{ github.event.head_commit.timestamp }} + payload: | + { + "attachments": [{ + "title": "${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}", + "title_link": "https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks", + "text": "${{ github.repository }}@${{ github.ref }}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>\nby ${{ github.event.head_commit.committer.name }} on ${{ github.event.head_commit.timestamp }}: ${{ github.event.head_commit.message }}", + "color": "danger" + }] + } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} if: failure() && github.event_name == 'push' |