diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-28 00:13:54 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-28 00:16:16 +0900 |
commit | dd032a5fb4dd8da59c685910b3c673439edc8c42 (patch) | |
tree | 4896d8febcdf20b794c39940acb66bbd0dcdf6e3 | |
parent | 9928a6a3670fff8c87d1def74c719987acae8cf0 (diff) | |
download | ruby-dd032a5fb4dd8da59c685910b3c673439edc8c42.tar.gz |
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.
-rw-r--r-- | .github/workflows/coverage.yml | 4 | ||||
-rw-r--r-- | .github/workflows/doxygen.yml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 404c60608f..dafc734ba3 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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 }} diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index c6b15f8f61..73937a2097 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -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 }} |