From 5eaa2d80dddfe7de6f7cc75fcaeb554851737685 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 14 Mar 2021 15:42:54 -0400 Subject: [PATCH] Update README.md --- README.md | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index ee49b07e..8ec77fc3 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,31 @@ changed-files Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---diff-filterACDMRTUXB82308203) to locate all files that have been modified relative to the default branch. +## Usage + +```yaml +... + steps: + - uses: actions/checkout@v2 + - name: Get modified files with defaults + id: changed-files + uses: ./ + + - name: Get modified files with comma separator + id: changed-files-comma + uses: ./ + with: + separator: "," + + - name: List all added files + run: | + for file in "${{ steps.changed-files.outputs.added_files }}"; do + echo $file + done + +``` + + ## Inputs | Input | type | required | default | description | @@ -31,23 +56,6 @@ Using the default separator. | all_changed_files | `string` | 'new.txt other.png ...' | Select all paths (*) are selected if there
is any file that matches other
criteria in the comparison;
if there is no file that
matches other criteria,
nothing is selected. | -## Usage - -```yaml -... - steps: - - uses: actions/checkout@v2 - - name: Get modified files with defaults - id: changed-files - uses: ./ - - - name: Get modified files with comma separator - id: changed-files-comma - uses: ./ - with: - separator: "," -``` - * Free software: [MIT license](LICENSE)