Skip to content

Difference between any_changed and only_changed #2210

Answered by jackton1
chadtomkiss asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @chadtomkiss, with the following code

- name: Get changed app files
    id: changed-files-app
    uses: tj-actions/changed-files@v44
    with:
      files: |
        app/**

any_changed: This would be true if the full sets of commits being compared include a change to any files in the app folder, including subfolders. If the full sets of commits compared only include changes made to other files and folders outside the app folder, then any_changed would be false.

only_changed: On the other hand, this would be true only when the full sets of commits compared only include changes to the app folder if any other files change, then only_changed would be false.

You want to use any_changed for …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jackton1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants