changed-files: [BUG] Specfic File Bug in v33 / v34 - grep: : No such file or directory
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?
With the workflow below, I’m able to successfully run it on V32 and below of this action, but V33 and V34 are failing when I have a single file in the files to check list.
To Reproduce
jobs:
sync:
name: Check for config changes
runs-on: ubuntu-latest
steps:
- name: Checkout code
id: checkout-code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v34
with:
files: |
server/src/configs/default.json
- name: Setup Node.js environment
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Run script
if: steps.changed-files.outputs.any_changed == 'true'
run: |
yarn config-check
- name: Commit and push changes
if: steps.changed-files.outputs.any_changed == 'true'
uses: devops-infra/action-commit-push@v0.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: Sync character count for config ref file
What OS are you seeing the problem on?
ubuntu-latest or ubuntu-20.04
Expected behavior?
I’m expecting it to not fail and report if the single file has changed.
Relevant log output
Run tj-actions/changed-files@v34
Run # "Calculating the previous and current SHA..."
changed-files-diff-sha
Run tj-actions/glob@v16
/usr/bin/git rev-parse --show-toplevel
/home/runner/work/RepoName/RepoName
/usr/bin/git diff --diff-filter=D --name-only 847b2faabaed1776a0b45c98861a1d3b0490709c..8d3a2959f97f5fbfef7d523c4f40531d60eedf41
Run bash $GITHUB_ACTION_PATH/get-changed-paths.sh
changed-files
Resolving repository path: /home/runner/work/RepoName/RepoName/.
Retrieving changes between 847b2faabaed1776a0b45c98861a1d3b0490709c (branch-name) → 8d3a2959f97f5fbfef7d523c4f40531d60eedf41 (branch-name)
grep: : No such file or directory
grep: : No such file or directory
grep: : No such file or directory
grep: : No such file or directory
/home/runner/work/_actions/tj-actions/changed-files/v34/get-changed-paths.sh: line 66: echo: write error: Broken pipe
Error: Process completed with exit code 1.
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 2 years ago
- Reactions: 3
- Comments: 17 (9 by maintainers)
@staticaland @dlopeza After reaching out to the support team I discovered that there are differences in Implementation of the native workflow globstar matching and the https://github.com/isaacs/minimatch library used by this action an example of such differences can be seen below
Again I’ll suggest you use
dev/**/*.tfinstead@staticaland See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-file-paths
I believe
dev/*.tfis what you want or an alternative to match subdirectoriesdev/**/*.tf