pytorch
05f137c7 - Remove GHA "Checkout PR tip" step (#53719)

Commit
3 years ago
Remove GHA "Checkout PR tip" step (#53719) Summary: This PR replaces our current "Checkout PR tip" step (which is duplicated across many places) using a [scenario](https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit) from the `actions/checkout` README. We previously tried something similar in https://github.com/pytorch/pytorch/issues/49578, but using `github.head_ref` didn't work. The reason this PR works is because, for events besides `pull_request`, the value of `github.event.pull_request.head.sha` defaults to the empty string, so it's as if we didn't set the `ref` option for `actions/checkout` at all, so it just uses its default behavior (e.g. for `push` events). Incidentally, this PR also upgrades our use of `actions/checkout` from `v1` to `v2`, which introduces shallow clones by default. A couple of our jobs require deep clones, so we use `fetch-depth: 0` in those cases. Pull Request resolved: https://github.com/pytorch/pytorch/pull/53719 Test Plan: CI. Reviewed By: albanD Differential Revision: D26949121 Pulled By: samestep fbshipit-source-id: e06f8066682ae0557fb5a055a10ea33b6bd320db
Author
Parents
Loading