1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Checkout with git on cygwin for EOL code

`shell: bash` runs bash on msys which prefers git on msys too,
then checked out in CRLF mode.  Cygwin sed doesn't consider the CR
a part of EOL code, though.
This commit is contained in:
Nobuyoshi Nakada 2020-01-13 10:02:04 +09:00
parent 61ff5cd5fd
commit c9b1969fa3
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -44,10 +44,10 @@ jobs:
# Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
- name: Checkout ruby
run: |
git clone --single-branch --shallow-since=yesterday --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src
git clone --single-branch --shallow-since=yesterday --branch=%GITHUB_REF:refs/heads/=% https://github.com/${{ github.repository }} src
git -C src reset --hard ${{ github.sha }}
if: github.event_name == 'push'
shell: bash
shell: cmd
- name: Checkout a pull request
run: |
git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src