mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Make doxygen / coverage torelant to clone race
a little. Doing both `git clone --depth=1` and `git reset --hard ${sha}` does not make sense (the latter command either does nothing or just fails), so I added non-1 value as a depth. Maybe we don't need depth=50 for pull_request and schedule, so it's 10 for now.
This commit is contained in:
parent
9928a6a367
commit
dd032a5fb4
2 changed files with 4 additions and 4 deletions
4
.github/workflows/coverage.yml
vendored
4
.github/workflows/coverage.yml
vendored
|
@ -19,12 +19,12 @@ jobs:
|
|||
|
||||
# Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
|
||||
- name: Checkout ruby/ruby
|
||||
run: git clone --depth=1 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
|
||||
run: git clone --depth=10 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
|
||||
env:
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
if: github.event_name == 'schedule'
|
||||
- name: Checkout a pull request
|
||||
run: git clone --depth=1 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
|
||||
run: git clone --depth=10 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
|
||||
env:
|
||||
GITHUB_REV: ${{ github.event.pull_request.head.sha }}
|
||||
GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
|
|
4
.github/workflows/doxygen.yml
vendored
4
.github/workflows/doxygen.yml
vendored
|
@ -19,12 +19,12 @@ jobs:
|
|||
|
||||
# Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
|
||||
- name: Checkout ruby/ruby
|
||||
run: git clone --depth=1 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
|
||||
run: git clone --depth=10 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
|
||||
env:
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
if: github.event_name == 'schedule'
|
||||
- name: Checkout a pull request
|
||||
run: git clone --depth=1 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
|
||||
run: git clone --depth=10 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
|
||||
env:
|
||||
GITHUB_REV: ${{ github.event.pull_request.head.sha }}
|
||||
GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
|
|
Loading…
Add table
Reference in a new issue