.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: | run: |
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
# Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork. - uses: actions/checkout@v2
- name: Checkout ruby with:
run: | fetch-depth: 128
git clone --single-branch --shallow-since=yesterday --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src path: 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'
- run: ./src/tool/actions-commit-info.sh - run: ./src/tool/actions-commit-info.sh
id: commit_info id: commit_info
- name: Install libraries - name: Install libraries

View File

@ -27,19 +27,10 @@ jobs:
run: | run: |
git config --system core.autocrlf false git config --system core.autocrlf false
git config --system core.eol lf git config --system core.eol lf
# Not using official actions/checkout@v2 because it's unstable. - uses: actions/checkout@v2
- name: Checkout ruby with:
run: | fetch-depth: 128
git clone --single-branch --shallow-since=yesterday --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src path: 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
- run: ./src/tool/actions-commit-info.sh - run: ./src/tool/actions-commit-info.sh
shell: bash shell: bash
id: commit_info id: commit_info

View File

@ -18,17 +18,10 @@ jobs:
set -x set -x
sudo apt-get update -q || : 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 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. - uses: actions/checkout@v2
- name: Checkout ruby with:
run: | fetch-depth: 128
git clone --single-branch --shallow-since=yesterday --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src path: 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'
- run: ./src/tool/actions-commit-info.sh - run: ./src/tool/actions-commit-info.sh
id: commit_info id: commit_info
- name: Fixed world writable dirs - name: Fixed world writable dirs

View File

@ -24,17 +24,10 @@ jobs:
set -x set -x
sudo apt-get update -q || : 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 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. - uses: actions/checkout@v2
- name: Checkout ruby with:
run: | fetch-depth: 128
git clone --single-branch --shallow-since=yesterday --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src path: 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'
- run: ./src/tool/actions-commit-info.sh - run: ./src/tool/actions-commit-info.sh
id: commit_info id: commit_info
- name: Fixed world writable dirs - name: Fixed world writable dirs

View File

@ -31,18 +31,10 @@ jobs:
- name: Install libraries with chocolatey - name: Install libraries with chocolatey
run: | run: |
choco install --no-progress openssl winflexbison3 choco install --no-progress openssl winflexbison3
# Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork. - uses: actions/checkout@v2
- name: Checkout ruby with:
run: | fetch-depth: 128
git clone --single-branch --shallow-since=yesterday --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src path: 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'
- run: ./src/tool/actions-commit-info.sh - run: ./src/tool/actions-commit-info.sh
shell: bash shell: bash
id: commit_info id: commit_info