Skip to content

Support multiple branches being checked out through config #214

Description

@bnb

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 against master 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:

    steps:
    - uses: actions/checkout@v2
    - run: |
        git fetch --no-tags --depth=1 origin master
        git checkout -b master
        git checkout ${{ github.event.pull_request.head.sha }}

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:

    steps:
    - uses: actions/checkout@v2
       checkout: ['master']

checkout may not be the most appropriate name, but the idea is more of what I'm going for here ❤️

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions