How can I only run a step if the workflow is running in the main repository, and not within a fork?
I would have thought that
if: github.repository == 'octo-org/octo-repo-prod'
would do it, but it does not – and while if: ${{ github.event.pull_request.head.repo.full_name == 'octo-org/octo-repo-prod' }}
does work for PRs, it does not work for merges or scheduled builds.
Recognized by CI/CD Collective