ruby-changes:60043
From: Takashi <ko1@a...>
Date: Thu, 13 Feb 2020 15:23:15 +0900 (JST)
Subject: [ruby-changes:60043] 77dfa520d4 (ruby_2_7): Official actions/checkout is useless
https://git.ruby-lang.org/ruby.git/commit/?id=77dfa520d4 From 77dfa520d476143b8be6c4805354838012b4d335 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Tue, 31 Dec 2019 01:49:08 -0800 Subject: Official actions/checkout is useless It died again https://github.com/ruby/ruby/runs/368837347 diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 89ece0d..56f8c6b 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -36,10 +36,21 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L36 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/