From 1dd9511b6723b2781e65e2b4093a714576802302 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 25 Oct 2022 17:53:08 -0700 Subject: [PATCH] Use ruby/action-slack@v3.0.0 and ref_name (#6633) It's moved from k0kubun to ruby org. Also, we don't need JavaScript eval to generate branch if we use github.ref_name, so v3.0.0 is a version that doesn't use eval. Co-Authored-By: Nobuyoshi Nakada Co-authored-by: Nobuyoshi Nakada --- .github/workflows/baseruby.yml | 4 ++-- .github/workflows/check_dependencies.yml | 4 ++-- .github/workflows/check_misc.yml | 4 ++-- .github/workflows/compilers.yml | 4 ++-- .github/workflows/macos.yml | 4 ++-- .github/workflows/mingw.yml | 4 ++-- .github/workflows/mjit-bindgen.yml | 4 ++-- .github/workflows/mjit.yml | 4 ++-- .github/workflows/spec_guards.yml | 4 ++-- .github/workflows/ubuntu.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- .github/workflows/yjit-ubuntu.yml | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/baseruby.yml b/.github/workflows/baseruby.yml index 65d2813ac2..8152cad768 100644 --- a/.github/workflows/baseruby.yml +++ b/.github/workflows/baseruby.yml @@ -57,7 +57,7 @@ jobs: - run: make incs - run: make all - run: make test - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -65,7 +65,7 @@ jobs: "env": "${{ github.workflow }} / BASERUBY @ ${{ matrix.ruby }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/check_dependencies.yml b/.github/workflows/check_dependencies.yml index 1753f46574..16e2829f73 100644 --- a/.github/workflows/check_dependencies.yml +++ b/.github/workflows/check_dependencies.yml @@ -56,7 +56,7 @@ jobs: - run: make all golf - run: ruby tool/update-deps --fix - run: git diff --no-ext-diff --ignore-submodules --exit-code - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -64,7 +64,7 @@ jobs: "env": "${{ matrix.os }} / Dependencies need to update", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml index 71ac956695..e897015d56 100644 --- a/.github/workflows/check_misc.yml +++ b/.github/workflows/check_misc.yml @@ -98,7 +98,7 @@ jobs: GIT_COMMITTER_NAME: git if: ${{ github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull') && steps.diff.outcome == 'failure' }} - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -106,7 +106,7 @@ jobs: "env": "${{ github.workflow }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 8080963fa6..60fcc94c5e 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -268,7 +268,7 @@ jobs: - run: make test-annocheck if: ${{ matrix.entry.check && endsWith(matrix.entry.name, 'annocheck') }} - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -276,7 +276,7 @@ jobs: "env": "${{ github.workflow }} / ${{ matrix.entry.name }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 04446d3f05..e5f055f8c4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -85,7 +85,7 @@ jobs: PRECHECK_BUNDLED_GEMS: "no" if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }} continue-on-error: ${{ matrix.continue-on-skipped_tests || false }} - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -93,7 +93,7 @@ jobs: "env": "${{ matrix.os }} / ${{ matrix.test_task }}${{ matrix.configure }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 5c8189428c..001fab9cf1 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -151,7 +151,7 @@ jobs: make ${{ StartsWith(matrix.test_task, 'spec/') && matrix.test_task || 'test-spec' }} if: ${{matrix.test_task == 'check' || matrix.test_task == 'test-spec' || StartsWith(matrix.test_task, 'spec/')}} - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -159,7 +159,7 @@ jobs: "env": "${{ github.workflow }} ${{ matrix.msystem }} / ${{ matrix.test_task }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/mjit-bindgen.yml b/.github/workflows/mjit-bindgen.yml index e1d22d91f2..1252d3b509 100644 --- a/.github/workflows/mjit-bindgen.yml +++ b/.github/workflows/mjit-bindgen.yml @@ -83,7 +83,7 @@ jobs: - run: $SETARCH make ${{ matrix.task }} - run: git diff --exit-code working-directory: src - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -91,7 +91,7 @@ jobs: "env": "${{ matrix.os }} / ${{ matrix.test_task }}${{ matrix.configure }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml index 89bc0a226b..c468e01811 100644 --- a/.github/workflows/mjit.yml +++ b/.github/workflows/mjit.yml @@ -84,7 +84,7 @@ jobs: ulimit -c unlimited make -s test-spec RUN_OPTS="$RUN_OPTS" timeout-minutes: 60 - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -92,7 +92,7 @@ jobs: "env": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.jit_opts }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/spec_guards.yml b/.github/workflows/spec_guards.yml index 6d51320c2f..e3201eb6db 100644 --- a/.github/workflows/spec_guards.yml +++ b/.github/workflows/spec_guards.yml @@ -46,7 +46,7 @@ jobs: working-directory: spec/ruby env: CHECK_LEAKS: true - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -54,7 +54,7 @@ jobs: "env": "${{ github.workflow }} / rubyspec @ ${{ matrix.ruby }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 1a5b6661fe..508d2c7733 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -120,7 +120,7 @@ jobs: TESTS: ${{ matrix.skipped_tests }} if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }} continue-on-error: ${{ matrix.continue-on-skipped_tests || false }} - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -128,7 +128,7 @@ jobs: "env": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6f5106e815..7f96d3464b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -138,7 +138,7 @@ jobs: env: RUBY_TESTOPTS: -j${{env.TEST_JOBS}} --job-status=normal timeout-minutes: 60 - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -146,7 +146,7 @@ jobs: "env": "VS${{ matrix.vs }} / ${{ matrix.test_task || 'check' }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml index 176181f11c..62356e8b45 100644 --- a/.github/workflows/yjit-ubuntu.yml +++ b/.github/workflows/yjit-ubuntu.yml @@ -135,7 +135,7 @@ jobs: BASE_REPO: ${{ github.event.pull_request.base.repo.full_name }} BASE_SHA: ${{ github.event.pull_request.base.sha }} if: ${{ matrix.test_task == 'yjit-bench' && startsWith(github.event_name, 'pull') }} - - uses: k0kubun/action-slack@v2.0.0 + - uses: ruby/action-slack@v3.0.0 with: payload: | { @@ -143,7 +143,7 @@ jobs: "env": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.configure }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", - "branch": "${{ github.ref }}".split('/').reverse()[0] + "branch": "${{ github.ref_name }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot