Closed ChristianVermeulen closed 8 months ago
Thanks for reporting @ChristianVermeulen.
Looks like a documentation error on my side. When you want to read the output of a workflow step, you need to give that step an explicit ID. That's something we currently don't mention in the README.
Could you add an id
of "auto-commit-action" to your workflow like this?
- uses: stefanzweifel/git-auto-commit-action@v5
+ id: auto-commit-action
with:
commit_message: Autofixed your phpscs for ya
commit_user_name: christianvermeulen
commit_user_email: christian.vermeulen@******.be
commit_author: christianvermeulen <christian.vermeulen@******.be>
- name: Notify PR owner
if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Hey @${{ github.event.pull_request.head.repo.owner.login }}, I've taken the liberty to fix your CS (${{steps.auto-commit-action.outputs.commit_hash}}). Don't forget to pull before you push new commit!
This should fix the issue.
@stefanzweifel Ah, that was it indeed! I did not know that about the GH Action 😅 Thanks for answering so quick!
Would you like me to do a quick PR to add it in the docs?
@ChristianVermeulen Feel free to send in a PR. ♥️
It probably makes sense to expand the example in the README here.
Ready for review in #324. Thanks again!
git-auto-commit Version
V5
Machine Type
Ubuntu (eg. ubuntu-latest)
Bug description
When trying to use the output in order to place a comment on the PR, the next step is never triggered because there is no output.
Steps to reproduce
if: steps.auto-commit-action.outputs.changes_detected == 'true'
The next step will not run.
Tried solutions
No response
Example Workflow
Relevant log output
I added a debug step to echo all steps output like so:
The output of that json is as follows:
As you can see, there is no output from the auto-commit job, only from a different composer-cache job.