From 9b5e5ee10a5c7b2e05d5f25da265a1c73b24e6a6 Mon Sep 17 00:00:00 2001 From: Christian Vermeulen Date: Fri, 15 Mar 2024 16:06:58 +0100 Subject: [PATCH] Add step id explanation for output in README.md (#324) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 5eb5748..afd09f6 100644 --- a/README.md +++ b/README.md @@ -167,9 +167,16 @@ You can use these outputs to trigger other Actions in your Workflow run based on - `changes_detected`: Returns either "true" or "false" if the repository was dirty and files have changed. - `commit_hash`: Returns the full hash of the commit if one was created. +**⚠️ When using outputs, the step needs to be given an id. See example below.** + ### Example ```yaml + - uses: stefanzweifel/git-auto-commit-action@v5 + id: auto-commit-action #mandatory for the output to show up in ${{ steps }} + with: + commit_message: Apply php-cs-fixer changes + - name: "Run if changes have been detected" if: steps.auto-commit-action.outputs.changes_detected == 'true' run: echo "Changes!"