Git Product home page Git Product logo

Comments (2)

castarco avatar castarco commented on June 18, 2024

I'm having a similar problem. The action works perfectly fine in PRs/branches, but once I perform a merge operation... it fails because of the same problem.

I'm considering doing something similar as to what you have done, although perhaps even more complicated, with some added conditional logic to only perform the checkout when there is a merge operation (what remains to be seen is how I'll make it to define base conditionally, as it doesn't make sense to obtain PREV_COMMIT_SHA if I didn't perform a checkout yet).

Another option is to make this to not execute this action on merge, and modify the conditionals that depend on this one to also execute on merge. That would save less time in CI, but I don't expect as many merge operations as commits to PRs.

EDIT: It seems that we can use conditionals in expressions actions/runner#409 , the approximation is a bit brittle ("same" as in POSIX shell, ugh), but better than nothing.

from paths-filter.

ozancaglayan avatar ozancaglayan commented on June 18, 2024

Hi both.

Can't you achieve this with just base: ${{ github.ref }} ? It seems that its working correctly for both open PRs and further pushes to the PR and when I merge the PR to main. Curious if I'm missing anything.

from paths-filter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.