mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use actions/checkout for PR (#2804)
This commit is contained in:
parent
049292e302
commit
139f0d90d9
Notes:
git
2020-01-01 02:34:51 +09:00
Merged-By: k0kubun <takashikkbn@gmail.com>
1 changed files with 4 additions and 7 deletions
11
.github/workflows/mingw.yml
vendored
11
.github/workflows/mingw.yml
vendored
|
@ -42,14 +42,11 @@ jobs:
|
|||
git clone --single-branch --shallow-since=yesterday https://github.com/ruby/ruby src
|
||||
git -C src reset --hard "$GITHUB_SHA"
|
||||
if: github.event_name == 'push'
|
||||
# It's hard to propagate `env` to this workflow's shell environment to checkout PR. Using unstable actions/checkout as a workaround.
|
||||
- name: Checkout a pull request
|
||||
run: |
|
||||
git clone --single-branch --shallow-since=yesterday "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src
|
||||
git -C src reset --hard "$GITHUB_REV"
|
||||
env:
|
||||
GITHUB_REV: ${{ github.event.pull_request.head.sha }}
|
||||
GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: src
|
||||
if: github.event_name == 'pull_request'
|
||||
- run: ./src/tool/actions-commit-info.sh
|
||||
shell: bash
|
||||
|
|
Loading…
Reference in a new issue