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

.github: use actions/checkout@v2 again

This commit is contained in:
卜部昌平 2020-05-11 18:37:08 +09:00
parent ee518cf077
commit b16acf8baa
Notes: git 2020-05-12 17:15:57 +09:00
5 changed files with 20 additions and 58 deletions

View file

@ -13,17 +13,10 @@ jobs:
run: |
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
# 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 -C src reset --hard "$GITHUB_SHA"
if: github.event_name == 'push'
- name: Checkout a pull request
run: |
git clone --single-branch --depth=50 --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'
- uses: actions/checkout@v2
with:
fetch-depth: 128
path: src
- run: ./src/tool/actions-commit-info.sh
id: commit_info
- name: Install libraries

View file

@ -27,19 +27,10 @@ jobs:
run: |
git config --system core.autocrlf false
git config --system core.eol lf
# Not using official actions/checkout@v2 because it's unstable.
- name: Checkout ruby
run: |
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
- name: Checkout a pull request
run: |
git clone --single-branch --depth=50 --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'
shell: bash
- uses: actions/checkout@v2
with:
fetch-depth: 128
path: src
- run: ./src/tool/actions-commit-info.sh
shell: bash
id: commit_info

View file

@ -18,17 +18,10 @@ jobs:
set -x
sudo apt-get update -q || :
sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby
# 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 -C src reset --hard "$GITHUB_SHA"
if: github.event_name == 'push'
- name: Checkout a pull request
run: |
git clone --single-branch --depth=50 --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'
- uses: actions/checkout@v2
with:
fetch-depth: 128
path: src
- run: ./src/tool/actions-commit-info.sh
id: commit_info
- name: Fixed world writable dirs

View file

@ -24,17 +24,10 @@ jobs:
set -x
sudo apt-get update -q || :
sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby
# 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 -C src reset --hard "$GITHUB_SHA"
if: github.event_name == 'push'
- name: Checkout a pull request
run: |
git clone --single-branch --depth=50 --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'
- uses: actions/checkout@v2
with:
fetch-depth: 128
path: src
- run: ./src/tool/actions-commit-info.sh
id: commit_info
- name: Fixed world writable dirs

View file

@ -31,18 +31,10 @@ jobs:
- name: Install libraries with chocolatey
run: |
choco install --no-progress openssl winflexbison3
# 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 -C src reset --hard ${{ github.sha }}
if: github.event_name == 'push'
shell: bash
- name: Checkout a pull request
run: |
git clone --single-branch --depth=50 --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'
- uses: actions/checkout@v2
with:
fetch-depth: 128
path: src
- run: ./src/tool/actions-commit-info.sh
shell: bash
id: commit_info