1

Let's say that I have an action like such:

    name: Another_Action
    on:
      push:
        - ...
      pull_request:
        - ...

And I want it so that it only runs when a new file is committed.

I've got some options from the autocomplete:

Option Would help?
branches Nope
branches-ignore Nope
tags ???
tags-ignore ???
paths Maybe
paths-ignore Maybe
types ???

Using paths-ignore and listing all files and directories we already know of won't work since I want it automated and the directories won't stay the same forever.

I'm thinking of using paths for this since I already have used it in the past...

But I don't know how to use it in this context.

2
  • Please show what you have tried Commented Jul 8, 2022 at 5:40
  • @rethab I have tried listing all the files first and adding them to paths-ignore, but it won't work on this context since the directory won't stay the same forever. Commented Jul 8, 2022 at 5:46

1 Answer 1

1

There is no such option. You can only abort the pipeline early by checking for new files after the checkout step has run

Sign up to request clarification or add additional context in comments.

2 Comments

how can new file be identified after checkout? could you please elaborate?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.