Closed MatousJobanek closed 8 months ago
split the workflow.yml file into
workflow.yml
test-with-coverage.yml
linters.yml
The main reason is that with the new configuration: pull_request_target the workflow automatically checks out the code from master and not from PR. To make it work, we need to use:
pull_request_target
- name: Checkout code uses: actions/checkout@v4 with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}}
however, this is needed only for the tests, not for linters.
we could, but sometimes I get lost in the generic workflows that contain just too many actions and steps
split the
workflow.yml
file intotest-with-coverage.yml
linters.yml
The main reason is that with the new configuration:
pull_request_target
the workflow automatically checks out the code from master and not from PR. To make it work, we need to use:however, this is needed only for the tests, not for linters.