Fix the use of head_branch in filter-test-configs action (#107753)
This addresses https://github.com/pytorch/pytorch/security/advisories/GHSA-hw6r-g8gj-2987
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107753
Approved by: https://github.com/atalman, https://github.com/ZainRizvi, https://github.com/malfet