mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Make GitHub Actions Slack notification consistent
with Travis, rather than AppVeyor. Formerly it was made similar to AppVeyor to provide some normal set of CI failure notification. But for some reason people preferred a shorter variant and introduceda1d606c079
andd8d8015b93
. Instead of AppVeyor format, this commit chose Travis-like format to achieve consistency and to include usual CI-failure information, while keeping it one-liner for people who prefer short notifications. Note that this shrinks the 40-char sha to 10-char, using the new feature of k0kubun/action-slack@v2.0.0:1c88a05dac
This commit is contained in:
parent
efc8970336
commit
fd20b32130
3 changed files with 12 additions and 6 deletions
6
.github/workflows/macos.yml
vendored
6
.github/workflows/macos.yml
vendored
|
@ -57,12 +57,14 @@ jobs:
|
|||
if: matrix.test_task == 'test-bundled-gems' && !contains(github.event.head_commit.message, '[ci skip]')
|
||||
- name: Leaked Globals
|
||||
run: make -s leaked-globals
|
||||
- uses: k0kubun/action-slack@v1.0.0
|
||||
- uses: k0kubun/action-slack@v2.0.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
"attachments": [{
|
||||
"text": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}> (<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>)",
|
||||
"text": "${{ job.status}}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ github.workflow }} / ${{ matrix.test_task }}> " +
|
||||
"(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
|
||||
"of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
|
||||
"color": "danger"
|
||||
}]
|
||||
}
|
||||
|
|
6
.github/workflows/ubuntu.yml
vendored
6
.github/workflows/ubuntu.yml
vendored
|
@ -65,12 +65,14 @@ jobs:
|
|||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
if: failure() && github.event_name == 'push'
|
||||
- uses: k0kubun/action-slack@v1.0.0
|
||||
- uses: k0kubun/action-slack@v2.0.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
"attachments": [{
|
||||
"text": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}> (<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>)",
|
||||
"text": "${{ job.status}}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ github.workflow }} / ${{ matrix.test_task }}> " +
|
||||
"(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
|
||||
"of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
|
||||
"color": "danger"
|
||||
}]
|
||||
}
|
||||
|
|
6
.github/workflows/windows.yml
vendored
6
.github/workflows/windows.yml
vendored
|
@ -54,12 +54,14 @@ jobs:
|
|||
call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
nmake ${{ matrix.test_task }}
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||
- uses: k0kubun/action-slack@v1.0.0
|
||||
- uses: k0kubun/action-slack@v2.0.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
"attachments": [{
|
||||
"text": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}> (<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>)",
|
||||
"text": "${{ job.status}}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ github.workflow }} / ${{ matrix.test_task }}> " +
|
||||
"(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
|
||||
"of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
|
||||
"color": "danger"
|
||||
}]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue