-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple branches being checked out through config #214
Comments
Thanks for the tip on checking out multiple refs, that's going to help me out! My use case is similar - running linting tools only on the files that have changed using pre-commit. To do this, I use the following command:
But this isn't possible without specific run commands as @bnb has shown above. |
i think this proposal would fix: #155 |
Is there any way around this issue in |
@bnb Thank you for your hint! Actually, your example is not quite correct. When switching to master, you create a new branch from the current one, rather than switching to steps:
- uses: actions/checkout@v2
- run: |
git fetch --no-tags --depth=1 origin master
git checkout master
git checkout ${{ github.event.pull_request.head.sha }} |
I've been working on Actions CI that leverages both
actions/checkout
and Jest for tests.I am specifically using Jest's
changedSince
flag, which compares the current branch with the passed branch and limits the tests it is running to only those that are associated with the files changed. This is particularly useful for only running the relevant tests when compared againstmaster
in a PR.It would significantly reduce the necessary work for users if there was a way to include multiple branches in the run through a simple YAML property. At present, I need to do this:
something like the following would be amazingly useful, where
checkout
is an array of branches to checkout on every run while still keeping the PR's branch as the currently checked out branch:checkout
may not be the most appropriate name, but the idea is more of what I'm going for here ❤️The text was updated successfully, but these errors were encountered: