Git Product home page Git Product logo

Comments (4)

Cyberbeni avatar Cyberbeni commented on May 18, 2024

Ah, now I realised that this action is supposed to check for changes for the previous commit or the pull request and not local changes.

from paths-filter.

dorny avatar dorny commented on May 18, 2024

With some small changes I could make it work with local changes too. Could you please shortly describe your use case?

from paths-filter.

Cyberbeni avatar Cyberbeni commented on May 18, 2024

I managed to solve my issue with a simple run phase:

    - name: Detect changes in distributed code
      if: ${{ github.event.inputs.force != 'true' }}
      id: changes
      run: |
        if [[ $(git status --porcelain ./dist) != "" ]]; then
          echo "::set-output name=dist::true"
        fi

I have a workflow that updates dependencies for my GitHub Action but only (commits, pushes and) creates a pull request if the distributed code changed or the force input was set to true. (In case there is a security vulnerability in one of the development dependencies I want to force update, otherwise only if the actual output code changed) This workflow also runs weekly with a cron trigger.

from paths-filter.

dorny avatar dorny commented on May 18, 2024

Detecting local changes is pretty easy. Usually there's no real need for a 3rd party action as you already figured out. Anyway supporting this will require just a cosmetic changes to what I have already so I will add it in next days.

Thanks for the idea 👍

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.