-
Notifications
You must be signed in to change notification settings - Fork 220
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
Consume list-files #64
Comments
Hello, GitHub context variables are not mapped to shell variables (unless you set them as env variables). Next things is what is actually output of this actions. For your example it would be: {
"server": "true",
"server_files": "\"server/pricinf/main.go\" \"server/sendmain/packGreet/logic.go\"",
"changes": ["server"]
} You wrote you are trying to get list of services which changed, but you can't get that directly out of this. You could have for example this filter: with:
filters: |
pricing: 'server/pricing/**'
sendmail: 'server/sendmail/**' Afterwards you have several options:
For example the last options would look like this:
|
Hey @Kmelow, is your issue solved? Unless you have more issues/questions I will close this. |
Hello @dorny, Thanks for the suggestion on And I implemented a script using your suggested example and it is all good 👍 - name: Printing changed services
run: |
for val in ${{ join(fromJson(steps.changes.outputs.changes), ' ') }}; do echo $val; done 🙇 Thank you |
Hello,
We have a microservice architecture operating in a mono-repo configuration.
I would like to create 1 Github Action to lint/test/publish/... only the service that has changed.
I thought of using the
list-files: shell
, then consuming the result by iterating through the list and for each path executing a command. Something on the lines of:for (service in list-files); cd service && golangci-lint run
.We'll be only changing one service at a time, so most likely the list will only have one value.
The workflow detects correctly which services have been changed, but I'm not able to consume the list correctly.
Any help is much appreciated.
Thanks,
My repo looks like this:
My
go.yml
looks like:I'm getting the following result after Github actions runs my workflow:
The text was updated successfully, but these errors were encountered: