tighten / duster

Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards.
MIT License
506 stars 16 forks source link

Add and update `ref` and `repository` in GH stubs #150

Closed driftingly closed 4 months ago

driftingly commented 4 months ago

This PR adds and updates actions/checkout by including ref and repository.

ref: ${{ github.event.pull_request.head.ref }}: This specifies the branch or tag ref that should be checked out. In this case, it's dynamically set to the branch associated with the pull request that triggered the workflow.

repository: ${{ github.event.pull_request.head.repo.full_name }}: This specifies the repository to be checked out. It's dynamically set to the repository associated with the pull request that triggered the workflow. This is useful when the workflow is triggered by a pull request from a forked repository.

If you commit directly to the main branch instead of creating a pull request, the github.event.pull_request.head.ref value will not be available and the actions/checkout action will default to checking out the commit that triggered the workflow run.