[前][次][番号順一覧][スレッド一覧]

ruby-changes:59563

From: Takashi <ko1@a...>
Date: Tue, 31 Dec 2019 17:04:18 +0900 (JST)
Subject: [ruby-changes:59563] 38c35dd22d (master): Make Slack notifications consistent

https://git.ruby-lang.org/ruby.git/commit/?id=38c35dd22d

From 38c35dd22d0d792309873fb5232758646c1f8569 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Mon, 30 Dec 2019 23:46:17 -0800
Subject: Make Slack notifications consistent


diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index 3e9db00..89ece0d 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -28,7 +28,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L28
       UPDATE_UNICODE: "UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
     strategy:
       matrix:
-        test_task: [ "check" ] # not used, but to make job names consistent
+        test_task: [ "check" ] # to make job names consistent
       fail-fast: false
     if: "!contains(github.event.head_commit.message, '[ci skip]')"
     steps:
@@ -133,3 +133,18 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L133
           [Console]::InputEncoding  = [System.Text.Encoding]::GetEncoding("IBM437")
           $jobs = [int]$env:NUMBER_OF_PROCESSORS
           make -C build test-all TESTOPTS="--retry --job-status=normal --show-skip --timeout-scale=1.5 --excludes=../src/test/excludes -n !/memory_leak/ -j $jobs"
+
+      - uses: k0kubun/action-slack@v...
+        with:
+          payload: |
+            {
+              "attachments": [{
+                "text": "${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ steps.commit_info.outputs.COMMIT_DATE }} #${{ steps.commit_info.outputs.COMMIT_NUMBER_OF_DAY }}> " +
+                        "(<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"
+              }]
+            }
+        env:
+          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+        if: failure() && github.event_name == 'push'
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
index d6ebcaf..cdb4170 100644
--- a/.github/workflows/mjit.yml
+++ b/.github/workflows/mjit.yml
@@ -10,7 +10,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mjit.yml#L10
   make:
     strategy:
       matrix:
-        test_task: [ "check" ] # not used, but to make job names consistent
+        test_task: [ "check" ] # to make job names consistent
         jit_opts: [ "--jit", "--jit-wait" ]
       fail-fast: false
     runs-on: ubuntu-latest
@@ -69,7 +69,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mjit.yml#L69
           payload: |
             {
               "attachments": [{
-                "text": "${{ job.status }}: ${{ github.workflow }} / ${{ matrix.jit_opts }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ steps.commit_info.outputs.COMMIT_DATE }} #${{ steps.commit_info.outputs.COMMIT_NUMBER_OF_DAY }}> " +
+                "text": "${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.jit_opts }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ steps.commit_info.outputs.COMMIT_DATE }} #${{ steps.commit_info.outputs.COMMIT_NUMBER_OF_DAY }}> " +
                         "(<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"
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]