From 240b9ad1fdab65e03bd7fa66160df9cde70b93d2 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 5 Oct 2020 19:47:23 +0200 Subject: [PATCH] Add Example on how to use Outputs --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index f38f859..26dcd30 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,18 @@ 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. +### Example + +```yaml + - name: "Run if changes have been detected" + if: steps.auto-commit-action.outputs.changes_detected == true + run: echo "Changes!" + + - name: "Run if no changes have been detected" + if: steps.auto-commit-action.outputs.changes_detected == false + run: echo "No Changes!" +``` + ## Limitations & Gotchas ### Checkout the correct branch