diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2023-06-28 23:17:54 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2023-06-29 16:58:11 +0900 |
commit | 48e646fd96a834709fdfdddf08b1ac7dd188d50f (patch) | |
tree | 60a9eee1e75657040e5b8d473ef0b064a6dcb4bc /.github/workflows | |
parent | 26b69fd4071b88c24654b19109beeb2ee416c0fa (diff) |
refactor extract ${{ ghithub }} expressions
Use composite action to reduce copy & paste.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7994
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/annocheck.yml | 12 | ||||
-rw-r--r-- | .github/workflows/baseruby.yml | 12 | ||||
-rw-r--r-- | .github/workflows/bundled_gems.yml | 11 | ||||
-rw-r--r-- | .github/workflows/check_dependencies.yml | 12 | ||||
-rw-r--r-- | .github/workflows/check_misc.yml | 11 | ||||
-rw-r--r-- | .github/workflows/compilers.yml | 12 | ||||
-rw-r--r-- | .github/workflows/macos.yml | 12 | ||||
-rw-r--r-- | .github/workflows/mingw.yml | 12 | ||||
-rw-r--r-- | .github/workflows/rjit-bindgen.yml | 11 | ||||
-rw-r--r-- | .github/workflows/rjit.yml | 12 | ||||
-rw-r--r-- | .github/workflows/spec_guards.yml | 12 | ||||
-rw-r--r-- | .github/workflows/ubuntu.yml | 12 | ||||
-rw-r--r-- | .github/workflows/wasm.yml | 12 | ||||
-rw-r--r-- | .github/workflows/windows.yml | 12 | ||||
-rw-r--r-- | .github/workflows/yjit-ubuntu.yml | 13 |
15 files changed, 28 insertions, 150 deletions
diff --git a/.github/workflows/annocheck.yml b/.github/workflows/annocheck.yml index 2fe326897e..eaa696990e 100644 --- a/.github/workflows/annocheck.yml +++ b/.github/workflows/annocheck.yml @@ -142,17 +142,9 @@ jobs: - run: make test-annocheck if: ${{ matrix.entry.check && endsWith(matrix.entry.name, 'annocheck') }} - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "${{ github.workflow }} / ${{ matrix.entry.name }}", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: + label: ${{ matrix.entry.name }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/baseruby.yml b/.github/workflows/baseruby.yml index 23d071e03b..12be397834 100644 --- a/.github/workflows/baseruby.yml +++ b/.github/workflows/baseruby.yml @@ -63,16 +63,8 @@ jobs: - run: make incs - run: make all - run: make test - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "${{ github.workflow }} / BASERUBY @ ${{ matrix.ruby }}", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: + label: ${{ matrix.ruby }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/bundled_gems.yml b/.github/workflows/bundled_gems.yml index 096c245d9a..e00de382e7 100644 --- a/.github/workflows/bundled_gems.yml +++ b/.github/workflows/bundled_gems.yml @@ -123,16 +123,7 @@ jobs: GIT_COMMITTER_NAME: git if: ${{ github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull') && steps.show.outcome == 'failure' }} - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "${{ github.workflow }} / update", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/check_dependencies.yml b/.github/workflows/check_dependencies.yml index 5899e327d8..6e3dee2a5e 100644 --- a/.github/workflows/check_dependencies.yml +++ b/.github/workflows/check_dependencies.yml @@ -64,16 +64,8 @@ jobs: - run: make all golf - run: ruby tool/update-deps --fix - run: git diff --no-ext-diff --ignore-submodules --exit-code - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "${{ matrix.os }} / Dependencies need to update", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: + label: ${{ matrix.os }} / Dependencies need to update SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml index 0a843643c4..5f83ecfbbb 100644 --- a/.github/workflows/check_misc.yml +++ b/.github/workflows/check_misc.yml @@ -97,16 +97,7 @@ jobs: GIT_COMMITTER_NAME: git if: ${{ github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull') && steps.diff.outcome == 'failure' }} - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "${{ github.workflow }}", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 0e1f394d92..6f50740780 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -267,17 +267,9 @@ jobs: - run: make test-annocheck if: ${{ matrix.entry.check && endsWith(matrix.entry.name, 'annocheck') }} - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "${{ github.workflow }} / ${{ matrix.entry.name }}", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: + label: ${{ matrix.entry.name }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3ae333ee07..bec31f1273 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -95,17 +95,9 @@ jobs: PRECHECK_BUNDLED_GEMS: "no" if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }} continue-on-error: ${{ matrix.continue-on-skipped_tests || false }} - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "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_name }}" - } - env: + label: ${{ matrix.test_task }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 90747453fb..e93c2b374d 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -159,17 +159,9 @@ 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: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "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_name }}" - } - env: + label: ${{ matrix.msystem }} / ${{ matrix.test_task }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/rjit-bindgen.yml b/.github/workflows/rjit-bindgen.yml index 8572ea6df6..90ac945627 100644 --- a/.github/workflows/rjit-bindgen.yml +++ b/.github/workflows/rjit-bindgen.yml @@ -85,17 +85,8 @@ jobs: - run: make ${{ matrix.task }} - run: git diff --exit-code working-directory: src - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "RJIT / bindgen", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/rjit.yml b/.github/workflows/rjit.yml index fe7e145ac5..fa3b2c42fd 100644 --- a/.github/workflows/rjit.yml +++ b/.github/workflows/rjit.yml @@ -115,17 +115,9 @@ jobs: env: GNUMAKEFLAGS: "" RUN_OPTS: ${{ matrix.run_opts }} - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "RJIT / ${{ matrix.run_opts }}", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: + label: ${{ matrix.run_opts }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/spec_guards.yml b/.github/workflows/spec_guards.yml index c4384f75f3..ad92428c12 100644 --- a/.github/workflows/spec_guards.yml +++ b/.github/workflows/spec_guards.yml @@ -46,16 +46,8 @@ jobs: working-directory: spec/ruby env: CHECK_LEAKS: true - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "${{ github.workflow }} / rubyspec @ ${{ matrix.ruby }}", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: + label: ${{ matrix.ruby }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 9e2a441bc8..f3e4aa3cd5 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -127,17 +127,9 @@ jobs: TESTS: ${{ matrix.skipped_tests }} if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }} continue-on-error: ${{ matrix.continue-on-skipped_tests || false }} - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "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_name }}" - } - env: + label: ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 8810fe1255..928a5bb308 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -115,17 +115,9 @@ jobs: ruby ./bootstraptest/runner.rb --ruby="$(which wasmtime) run $PWD/../build/ruby --mapdir /::./ -- " --verbose "--sets=$NO_THREAD_TESTS" working-directory: src - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "env": "${{ github.workflow }} / ${{ matrix.name }}", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}", - "branch": "${{ github.ref_name }}" - } - env: + label: ${{ matrix.name }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 687dee06f4..f1926baf19 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -140,17 +140,9 @@ jobs: env: RUBY_TESTOPTS: -j${{env.TEST_JOBS}} --job-status=normal timeout-minutes: 60 - - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "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_name }}" - } - env: + label: VS${{ matrix.vs }} / ${{ matrix.test_task || 'check' }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml index 6aaf18ae9e..06abae76a0 100644 --- a/.github/workflows/yjit-ubuntu.yml +++ b/.github/workflows/yjit-ubuntu.yml @@ -158,17 +158,10 @@ 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: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1 + + - uses: ./.github/actions/slack with: - payload: | - { - "ci": "GitHub Actions", - "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_name }}" - } - env: + label: ${{ matrix.test_task }} ${{ matrix.configure }} SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() && github.event_name == 'push' }} |