summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-12-31 01:49:08 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2019-12-31 01:49:17 -0800
commit2e1fd4e2d70172fd91c9722aaa3b114ec6cf2ea1 (patch)
tree5c3c214784ec3cbb83017c0ccfdcdcbc3213de13 /.github
parent918fe2ed7c6ec12beea3b925501a6782ecccd23d (diff)
Official actions/checkout is useless
It died again https://github.com/ruby/ruby/runs/368837347
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/mingw.yml19
1 files changed, 15 insertions, 4 deletions
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index 89ece0d013..56f8c6bc46 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -36,10 +36,21 @@ jobs:
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- - name: Checkout repo
- uses: actions/checkout@v2
- with:
- path: src
+ # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
+ - name: Checkout ruby/ruby
+ run: |
+ 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 --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 }}
+ GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
+ GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
+ if: github.event_name == 'pull_request'
- run: ./src/tool/actions-commit-info.sh
shell: bash
id: commit_info