Comments (6)
Hi @bbaral07 can you provide details of your workflow file. Include sections of both the checkout action and the changed-files action
from changed-files.
Hi @bbaral07 I'll suggest specifying the correct path
input if you're checking out the repository in another folder.
You can search for "Get all changed files for a repository located in a different path" in the Examples section.
from changed-files.
Hallo Jackton1,
thanks for your reply,
Below is the workflow part, where I do a checkout and then use the tj-actions/changed-files.
I followed the examples, but not sure if I am missing anything. Any hint or help is appreciated.
This is the point where I get the error (as in the original post)
- name: Repo Checkout
uses: actions/checkout@v4
with:
repository: org/tf_accounts
ref: 'feature'
fetch-depth: 0
clean: 'false'
- name: List the checkedout folders
shell: bash
run: |
pwd
ls -al
printf "\n%s\n" "${GITHUB_WORKSPACE}"
- name: Get all changed account json files
id: changed-account-files
if: contains(fromJson('["push", "pull_request"]'), github.event_name)
uses: tj-actions/changed-files@v41
with:
files: accounts/*.{json} # Alternatively using: `accounts/**`
files_ignore: accounts/schema.json
json: "true"
write_output_files: true
path: .
from changed-files.
Hi @bbaral07, thanks for sharing a couple of things to point out.
files
: You might want to use accounts/*.json
since you donโt need braces here.
path
: defaults to .
so no need to specify the same value.
Question: Is there a reason you have set clean: 'false'
?
Request: To fully get to a solution. Can you include the debug logs of the workflow not a picture or snippet but if possible the entire logs. To obtain the debug logs youโll need to rerun the workflow and ensure debug logging is enabled prior to rerunning the workflow.
![Screenshot 2023-08-31 at 5 51 33 PM](https://private-user-images.githubusercontent.com/17484350/264816489-41e2139b-38a8-4326-b3d1-efcbb3e21443.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTMwNTcwODAsIm5iZiI6MTcxMzA1Njc4MCwicGF0aCI6Ii8xNzQ4NDM1MC8yNjQ4MTY0ODktNDFlMjEzOWItMzhhOC00MzI2LWIzZDEtZWZjYmIzZTIxNDQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDE0VDAxMDYyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM0Y2M1ZGI0MWJjNzMwZTRiMDhhOTg0YWRjMmY3NDRkYzQzYjU0ZmI3YTVlY2U3NWMxNTgxNGExMDRhMGM3MzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YFo9VqCiOTdOrlwnfphuh9n4o3xz6uxQZ3qrISGd9Yg)
from changed-files.
Thanks, Jackton01 for your response.
Sorry for the delayed response.
I tried to hardcode the path, but still, it could not process the result to find the changed files.
I used (clean: 'false') to retain the .git folder as I received an error that it could not find the correct .git folder.
Alternatively, I wrote a short shell script to get the changed files instead of using the action.
Though I could not use it, I truly appreciate the purpose and functionality of this action.
Great Job. ๐
Maybe I will try in some other workflow.
from changed-files.
Sounds good, FYI the changed-files action doesn't only check that the .git folder exists but also validates the output of
git rev-parse --is-inside-work-tree
which should return "true"
.
If you run into this issue in the future this would help you determine what's wrong.
from changed-files.
Related Issues (20)
- Main should fail if node version > 16 and release notes need updating. HOT 1
- [BUG] Backwards incompatible changes after v38..., missing release notes, node16->node20 . HOT 1
- [BUG] files_yaml + json does not write the outputs to a json file HOT 1
- [Feature] Support a list of relative paths por inputs.path HOT 3
- Rewrite tj-actions/changed-files in typescript and properly handle filtering files based on diff results.
- [Feature] Check if changed files have added strings or removed strings HOT 1
- [Feature] Add option alias for using with Github action matrices HOT 3
- Ok
- [Feature] add support for changed files off workflow_run trigger HOT 4
- [Feature] allow forcing the action to use Github API, even if local .git directory is present HOT 11
- [BUG] `path` input does not work in combination with Github API approach HOT 4
- [BUG] `warnUnsupportedRESTAPIInputs` failing with composite action & `use_rest_api`
- [Feature] Enable `Diff` between Latest PR commit and the Previous one HOT 3
- [BUG] Error: Unable to locate the git repository in the given path HOT 4
- Merging issue_comment with pull_request HOT 5
- [BUG] any_modified/any_changed outputs are false for Pull Requests if no filters are set HOT 5
- [BUG] Inconsistent documentation about fetch_depth parameter HOT 2
- [Feature] Suppress warning message? HOT 1
- [BUG] Each file in a new line - Separator doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from changed-files.