summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2025-09-27 20:08:07 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2025-09-27 20:08:12 -0700
commit9b5eb828025cf0b7c023325e6e086422bcada355 (patch)
tree0cc97c580f847b40aa5dfff403f766b94a6277d4
parentcd42001f7d7bae833673bc08375af97395d66348 (diff)
Resurrect support of auto-style on master
which was broken by 9255db4bc08766763a6d78f50a90e05c58980899
-rw-r--r--.github/workflows/check_misc.yml14
1 files changed, 11 insertions, 3 deletions
diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml
index d4a2c6f3fe..5cca11abce 100644
--- a/.github/workflows/check_misc.yml
+++ b/.github/workflows/check_misc.yml
@@ -29,17 +29,25 @@ jobs:
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
# Run this step first to make sure auto-style commits are pushed
- - name: ${{ github.ref == 'refs/heads/master' && 'Auto-correct' || 'Check for' }} code styles
+ - name: Auto-correct code styles
run: |
set -x
ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" "$PUSH_REF"
env:
- EMAIL: svn-admin@ruby-lang.org
+ GITHUB_OLD_SHA: ${{ github.event.before }}
+ GITHUB_NEW_SHA: ${{ github.event.after }}
GIT_AUTHOR_NAME: git
GIT_COMMITTER_NAME: git
+ EMAIL: svn-admin@ruby-lang.org
+ PUSH_REF: ${{ github.ref }}
+ if: ${{ github.repository == 'ruby/ruby' && github.event_name == 'push' }}
+ - name: Check for code styles
+ run: |
+ set -x
+ ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA"
+ env:
GITHUB_OLD_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_NEW_SHA: ${{ github.event.pull_request.merge_commit_sha }}
- PUSH_REF: ${{ github.ref == 'refs/heads/master' && github.ref || '' }}
if: ${{ github.repository == 'ruby/ruby' && startsWith(github.event_name, 'pull') }}
- name: Check if C-sources are US-ASCII