changed-files: [BUG] `files_ignore` isn't respected
Is there an existing issue for this?
- I have searched the existing issues
Does this issue exist in the latest version?
- I’m using the latest release
Describe the bug?
I specified files and files_ignore as below.
- name: Get all script files that have changed
id: changed-files
uses: tj-actions/changed-files@v37
with:
files: |
assets/scripts/**.sh
.github/test-microk8s-ubuntu.yml
files_ignore: assets/scripts/configure-minikube-linux.sh
And the files changed are [assets/scripts/configure-minikube-linux.sh]. But steps.changed-files.outputs.any_modified == 'true' is evaluated as true.
To Reproduce
- Action is running on
ubuntu-latest - Config
name: test-microk8s-ubuntu
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Get all script files that have changed
id: changed-files
uses: tj-actions/changed-files@v37
with:
files: |
assets/scripts/**.sh
.github/test-microk8s-ubuntu.yml
files_ignore: assets/scripts/configure-minikube-linux.sh
- name: Configure MicroK8s Cluster
if: ${{ steps.changed-files.outputs.any_modified == 'true' }}
run: |
# blah blah
shell: bash
What OS are you seeing the problem on?
ubuntu-latest or ubuntu-20.04
Expected behavior?
steps.changed-files.outputs.any_modified should be set to false, when only files changed belong to files_ignore.
Relevant log output
No response
Anything else?
No response
Code of Conduct
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20 (11 by maintainers)
Yes, you are spot on
One small doubt, when a PR is created to dev branch from a feature branch: setting
since_last_remote_committo true gets the changed files from the commit on feature branch and compares with the commit on dev branch right (for the first time)? And for the subsequent commits, it checks using previous commits on the feature branch. Did I understand this correctly?No worries, was a fun debugging session.
Thank you. Also Apologies for incorrectly filing this as a bug.
For checking the commit you might want to use
since_last_remote_commitSure. Thanks a lot for the quick response!
Here’s the log. Didn’t include
changed-filesas it’s too long. This is the workflow file.