-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add a way to retrieve main components from files_yaml
with just one output
#1579
Comments
Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience. |
|
Thank you @jackton1, but actually, I need something else. Basically, I need to create a list of components that I will feed to a matrix, and I thought it would be more elegant if they would be such output from |
Yeah it's not clear you might have to use a working example |
Also note that you can also use the Instead of - name: Get all test, doc and src files that have changed
id: changed-files-yaml
uses: tj-actions/changed-files@v39
with:
files_yaml: |
doc:
- '**/*.md'
- docs/**
- README.md
test:
- test/**
- '!test/**.md'
src:
- src/**
- name: Run step if test file(s) change
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
... You can use - name: Get all test files that have changed
id: changed-files-yaml
uses: tj-actions/changed-files@v39
with:
files: |
test/**
!test/**.md
- name: Run step if test file(s) change
if: steps.changed-files-yaml.outputs.any_changed == 'true'
... |
Actually I just went through your request again I think you mean you want to know which key has changed files? E.g - name: Get all test, doc and src files that have changed
id: changed-files-yaml
uses: tj-actions/changed-files@v39
with:
files_yaml: |
doc:
- '**/*.md'
- docs/**
- README.md
test:
- test/**
- '!test/**.md'
src:
- src/** If there are changes to the Is this the case @V0lantis ? |
Thanks for thinking about it again @jackton1. This would help me pass the output directly to a matrix job definition like in matrix-test example but instead of files we would directly have the name of the root yaml object |
Okay, this can be supported easily in that case. |
I was trying to do it on my laptop but had some struggles setting up the local environment. Somehow, I needed to pass a hell lot of environment variables. I don't know if there was an easier way out |
Oh okay, sorry to hear that. Hopefully, the update simplifies things for you. |
@V0lantis This is now available using any of the following outputs changed_keys or modified_keys |
Amazing, thank-you @jackton1 ! |
Is this feature missing in the latest version?
Is your feature request related to a problem? Please describe.
Taking the example in the README.md on master:
From the snippet above, I would like to have all the different components which have any modifed / changed files and to get just the name of the component. For example,
Describe the solution you'd like?
If we have some changed files in doc, then the
echo
above would give us justdoc
as a result ect...Describe alternatives you've considered?
No response
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: