When using pull_request trigger, the workflow does not have access to repository secrets
Using pull_request_target allows sharing repository secrets (GH_TOKEN used to perform Github operation)
The permissions setting is not needed anymore as we are not using Github-generated token.
When using
pull_request
trigger, the workflow does not have access to repository secrets Usingpull_request_target
allows sharing repository secrets (GH_TOKEN used to perform Github operation) Thepermissions
setting is not needed anymore as we are not using Github-generated token.