aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-11-13 19:56:33 +0900
committerKazuhiro NISHIYAMA <znz@users.noreply.github.com>2019-11-13 20:21:09 +0900
commit7f2c98b11d9eedd7028a1ccb2c1f88db71db28ca (patch)
treec134cc7f0fa1733a04dbc7113d85d2dd7efeb33c /.github
parent990728170c5e4d6b763fa42c48ce82473d753aad (diff)
downloadruby-7f2c98b11d9eedd7028a1ccb2c1f88db71db28ca.tar.gz
Use shallow-since instead of depth
commit number of today requires log since 0:00 UTC. So commits of 24 hours are enough. https://www.git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt > Implies --single-branch unless --no-single-branch is given to fetch the histories near the tips of all branches. So I add `--single-branch` too.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/macos.yml4
-rw-r--r--.github/workflows/mjit.yml4
-rw-r--r--.github/workflows/ubuntu.yml4
-rw-r--r--.github/workflows/windows.yml4
4 files changed, 8 insertions, 8 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index b0cd602d30..1f9872779a 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -22,12 +22,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=50 https://github.com/ruby/ruby src
+ 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'
- name: Checkout a pull request
run: |
- git clone --depth=50 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src
+ 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 }}
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
index 898ea5613f..26533fa1b3 100644
--- a/.github/workflows/mjit.yml
+++ b/.github/workflows/mjit.yml
@@ -23,12 +23,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=50 https://github.com/ruby/ruby src
+ 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'
- name: Checkout a pull request
run: |
- git clone --depth=50 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src
+ 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 }}
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 847e4a1e97..e8198843ff 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -55,12 +55,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=50 https://github.com/ruby/ruby src
+ 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'
- name: Checkout a pull request
run: |
- git clone --depth=50 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src
+ 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 }}
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 8dd546bda6..e2597df39c 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -46,12 +46,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=50 https://github.com/ruby/ruby src
+ 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'
- name: Checkout a pull request
run: |
- git clone --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
+ 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
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
if: github.event_name == 'pull_request'
- run: ./src/tool/actions-commit-info.sh