Use github.event.before
This commit is contained in:
parent
69c1e4c422
commit
4805f20f44
9
.github/workflows/check_misc.yml
vendored
9
.github/workflows/check_misc.yml
vendored
@ -28,19 +28,14 @@ jobs:
|
|||||||
# Skip overwriting MATZBOT_GITHUB_TOKEN
|
# Skip overwriting MATZBOT_GITHUB_TOKEN
|
||||||
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
|
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
|
||||||
|
|
||||||
- name: Dump GitHub context
|
|
||||||
env:
|
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
||||||
run: echo "$GITHUB_CONTEXT"
|
|
||||||
|
|
||||||
# Run this step first to make sure auto-style commits are pushed
|
# Run this step first to make sure auto-style commits are pushed
|
||||||
- name: ${{ (github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master') && 'Auto-correct' || 'Check for' }} code styles
|
- name: ${{ (github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master') && 'Auto-correct' || 'Check for' }} code styles
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" "$PUSH_REF"
|
ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" "$PUSH_REF"
|
||||||
env:
|
env:
|
||||||
GITHUB_OLD_SHA: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.base.sha || github.before }}
|
GITHUB_OLD_SHA: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.base.sha || github.event.before }}
|
||||||
GITHUB_NEW_SHA: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.merge_commit_sha || github.sha }}
|
GITHUB_NEW_SHA: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.merge_commit_sha || github.event.after }}
|
||||||
PUSH_REF: ${{ (github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master') && github.ref || '' }}
|
PUSH_REF: ${{ (github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master') && github.ref || '' }}
|
||||||
|
|
||||||
- name: Check if C-sources are US-ASCII
|
- name: Check if C-sources are US-ASCII
|
||||||
|
Loading…
x
Reference in New Issue
Block a user