From 7d4243254629004007a390f7f1afc4a570a1fd00 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 6 Jan 2020 01:45:47 -0800 Subject: Support running Actions on a fork Since 8c9450e7b875db846b19cc631af0d7fee66db5c6, we increased the chance to run GitHub Actions on a fork, as we usually use a topic branch instead of master when filing a pull request. This patch makes it possible to reuse the same GitHub Actions config on a fork repository. --- .github/workflows/mjit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows/mjit.yml') diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml index 879b0c0cc7..2b923cfd05 100644 --- a/.github/workflows/mjit.yml +++ b/.github/workflows/mjit.yml @@ -22,9 +22,9 @@ jobs: 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/ruby + - name: Checkout push to ruby run: | - git clone --single-branch --shallow-since=yesterday https://github.com/ruby/ruby src + git clone --single-branch --shallow-since=yesterday https://github.com/${{ github.repository }} src git -C src reset --hard "$GITHUB_SHA" if: github.event_name == 'push' - name: Checkout a pull request -- cgit v1.2.3