Search code examples
travis-cigithub-actionsmigrating

Migrating from .travis CI to GITHUB action


migrating to the GitHub action from Travis CI, there is a line 'git diff --name-only "$TRAVIS_COMMIT_RANGE"' but it is for Travis and while running on GitHub action not getting the value of this variable "$TRAVIS_COMMIT_RANGE" what should we use instead of this variable to get the value


Solution

  • COMMIT_RANGE: ${{ github.event.before}}...${{ github.event.after}}
    

    In github.event we have all the details so, we can use before and after to get the "$COMMIT_RANGE" same as in travis "$TRAVIS_COMMIT_RANGE" variable