Make GHA workflow to retrieve latest promote-able SHA from master (#79548)
Relates to #76700
**Overview:** Wrote GHA to get the latest commit SHA. Another component of the script is pushing this SHA to the viable/strict branch but I'm planning to test that locally after verifying that this part is correct.
**Test Plan:** Monitor github actions results to see if the SHA printed is correct -- I wasn't able to check this on my personal fork.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79548
Approved by: https://github.com/seemethere