Add Example on how to use Outputs

This commit is contained in:
Stefan Zweifel 2020-10-05 19:47:23 +02:00
parent 57054d8e7e
commit 240b9ad1fd

View File

@ -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. - `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 ## Limitations & Gotchas
### Checkout the correct branch ### Checkout the correct branch