mirror of
https://github.com/tj-actions/changed-files
synced 2025-02-06 09:41:22 +00:00
feat: add support for json formatted output. (#557)
This commit is contained in:
parent
3020c439b0
commit
fb62fbd197
5 changed files with 141 additions and 36 deletions
39
.github/workflows/manual-matrix-test.yml
vendored
Normal file
39
.github/workflows/manual-matrix-test.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
name: Manual Matrix Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
changed-files:
|
||||||
|
name: Get changes
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: "{\"container\": ${{ toJson(steps.changed-files.outputs.all_changed_files) }} }"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # needed for tj-actions/changed-files
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v23
|
||||||
|
with:
|
||||||
|
json: true
|
||||||
|
- name: List all changed files
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files.outputs.all_changed_files) }}'
|
||||||
|
|
||||||
|
matrix-job:
|
||||||
|
name: Run Matrix Job
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [changed-files]
|
||||||
|
strategy:
|
||||||
|
matrix: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
|
||||||
|
max-parallel: 4
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
echo ${{ matrix.container }}
|
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
|
@ -332,6 +332,17 @@ jobs:
|
||||||
echo '${{ toJSON(steps.changed-files-pipe.outputs) }}'
|
echo '${{ toJSON(steps.changed-files-pipe.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Run changed-files with json output
|
||||||
|
id: changed-files-json
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
json: true
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-json.outputs) }}'
|
||||||
|
echo '${{ toJSON(steps.changed-files-json.outputs.all_changed_files) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Run changed-files with comma separator
|
- name: Run changed-files with comma separator
|
||||||
id: changed-files-comma
|
id: changed-files-comma
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
|
@ -147,6 +147,7 @@ Support this project with a :star:
|
||||||
| quotepath | `boolean` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
|
| quotepath | `boolean` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
|
||||||
| diff\_relative | `boolean` | `false` | | Exclude changes outside the current directory and show pathnames relative to it. |
|
| diff\_relative | `boolean` | `false` | | Exclude changes outside the current directory and show pathnames relative to it. |
|
||||||
| dir\_names | `boolean` | `false` | `false` | Output unique changed directories instead of filenames. <br> NOTE: This returns `.` for <br> changed files located in the root of the project. |
|
| dir\_names | `boolean` | `false` | `false` | Output unique changed directories instead of filenames. <br> NOTE: This returns `.` for <br> changed files located in the root of the project. |
|
||||||
|
| json | `boolean` | `false` | `false` | Output changed files in JSON format which can be used for matrix jobs. |
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -337,6 +338,13 @@ Support this project with a :star:
|
||||||
uses: tj-actions/changed-files@v24
|
uses: tj-actions/changed-files@v24
|
||||||
with:
|
with:
|
||||||
dir_names: "true"
|
dir_names: "true"
|
||||||
|
|
||||||
|
# All outputs are JSON formatted arrays and can be used in other actions and matrix compatible jobs.
|
||||||
|
- name: Run changed-files with json output
|
||||||
|
id: changed-files-json
|
||||||
|
uses: tj-actions/changed-files@v24
|
||||||
|
with:
|
||||||
|
json: "true"
|
||||||
```
|
```
|
||||||
|
|
||||||
<img width="1147" alt="Screen Shot 2021-11-19 at 4 59 21 PM" src="https://user-images.githubusercontent.com/17484350/142696936-8b7ca955-7ef9-4d53-9bdf-3e0008e90c3f.png">
|
<img width="1147" alt="Screen Shot 2021-11-19 at 4 59 21 PM" src="https://user-images.githubusercontent.com/17484350/142696936-8b7ca955-7ef9-4d53-9bdf-3e0008e90c3f.png">
|
||||||
|
|
|
@ -77,6 +77,10 @@ inputs:
|
||||||
default: "false"
|
default: "false"
|
||||||
description: "Output the absolute path to the changed directories instead of the filenames"
|
description: "Output the absolute path to the changed directories instead of the filenames"
|
||||||
required: false
|
required: false
|
||||||
|
json:
|
||||||
|
description: "Output changed files in JSON format which can be used for matrix jobs"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
added_files:
|
added_files:
|
||||||
|
@ -212,6 +216,7 @@ runs:
|
||||||
INPUT_OLD_NEW_FILES_SEPARATOR: ${{ inputs.old_new_files_separator }}
|
INPUT_OLD_NEW_FILES_SEPARATOR: ${{ inputs.old_new_files_separator }}
|
||||||
INPUT_DIFF_RELATIVE: ${{ inputs.diff_relative }}
|
INPUT_DIFF_RELATIVE: ${{ inputs.diff_relative }}
|
||||||
INPUT_DIR_NAMES: ${{ inputs.dir_names }}
|
INPUT_DIR_NAMES: ${{ inputs.dir_names }}
|
||||||
|
INPUT_JSON: ${{ inputs.json }}
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
icon: file-text
|
icon: file-text
|
||||||
|
|
|
@ -69,7 +69,7 @@ echo "::group::changed-files"
|
||||||
if [[ -n $INPUT_PATH ]]; then
|
if [[ -n $INPUT_PATH ]]; then
|
||||||
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
|
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
|
||||||
|
|
||||||
echo "::debug::Resolving repository path: $REPO_DIR"
|
echo "Resolving repository path: $REPO_DIR"
|
||||||
if [[ ! -d "$REPO_DIR" ]]; then
|
if [[ ! -d "$REPO_DIR" ]]; then
|
||||||
echo "::error::Invalid repository path: $REPO_DIR"
|
echo "::error::Invalid repository path: $REPO_DIR"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -77,11 +77,12 @@ if [[ -n $INPUT_PATH ]]; then
|
||||||
cd "$REPO_DIR"
|
cd "$REPO_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::debug::Retrieving changes between $INPUT_PREVIOUS_SHA ($INPUT_TARGET_BRANCH) → $INPUT_CURRENT_SHA ($INPUT_CURRENT_BRANCH)"
|
echo "Retrieving changes between $INPUT_PREVIOUS_SHA ($INPUT_TARGET_BRANCH) → $INPUT_CURRENT_SHA ($INPUT_CURRENT_BRANCH)"
|
||||||
|
|
||||||
echo "::debug::Getting diff..."
|
echo "Getting diff..."
|
||||||
|
|
||||||
if [[ -z "$INPUT_FILES_PATTERN_FILE" ]]; then
|
if [[ -z "$INPUT_FILES_PATTERN_FILE" ]]; then
|
||||||
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
@ -96,6 +97,22 @@ if [[ -z "$INPUT_FILES_PATTERN_FILE" ]]; then
|
||||||
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
||||||
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | awk -v d="$INPUT_OLD_NEW_FILES_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | awk -v d="$INPUT_OLD_NEW_FILES_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
||||||
|
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
@ -131,9 +148,13 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "${OTHER_CHANGED}" ]]; then
|
if [[ -n "${OTHER_CHANGED}" && "${OTHER_CHANGED}" != "[]" ]]; then
|
||||||
echo "::debug::Non Matching changed files: ${OTHER_CHANGED}"
|
echo "::debug::Non Matching changed files: ${OTHER_CHANGED}"
|
||||||
echo "::set-output name=only_changed::false"
|
echo "::set-output name=only_changed::false"
|
||||||
echo "::set-output name=other_changed_files::$OTHER_CHANGED"
|
echo "::set-output name=other_changed_files::$OTHER_CHANGED"
|
||||||
|
@ -160,9 +181,13 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "${OTHER_MODIFIED}" ]]; then
|
if [[ -n "${OTHER_MODIFIED}" && "$OTHER_MODIFIED" != "[]" ]]; then
|
||||||
echo "::debug::Non Matching modified files: ${OTHER_MODIFIED}"
|
echo "::debug::Non Matching modified files: ${OTHER_MODIFIED}"
|
||||||
echo "::set-output name=only_modified::false"
|
echo "::set-output name=only_modified::false"
|
||||||
echo "::set-output name=other_modified_files::$OTHER_MODIFIED"
|
echo "::set-output name=other_modified_files::$OTHER_MODIFIED"
|
||||||
|
@ -189,16 +214,20 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
OTHER_DELETED=$(echo "${OTHER_DELETED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "${OTHER_DELETED}" ]]; then
|
if [[ -n "${OTHER_DELETED}" && "${OTHER_DELETED}" != "[]" ]]; then
|
||||||
echo "::debug::Non Matching deleted files: ${OTHER_DELETED}"
|
echo "::debug::Non Matching deleted files: ${OTHER_DELETED}"
|
||||||
echo "::set-output name=only_deleted::false"
|
echo "::set-output name=only_deleted::false"
|
||||||
echo "::set-output name=other_deleted_files::$OTHER_DELETED"
|
echo "::set-output name=other_deleted_files::$OTHER_DELETED"
|
||||||
elif [[ -n "${DELETED}" ]]; then
|
elif [[ -n "${DELETED}" ]]; then
|
||||||
echo "::set-output name=only_deleted::true"
|
echo "::set-output name=only_deleted::true"
|
||||||
fi
|
fi
|
||||||
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
COPIED=$(echo "${COPIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
COPIED=$(echo "${COPIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
@ -210,6 +239,19 @@ else
|
||||||
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
ADDED=$(echo "${ADDED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
COPIED=$(echo "${COPIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
DELETED=$(echo "${DELETED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
MODIFIED=$(echo "${MODIFIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
RENAMED=$(echo "${RENAMED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
TYPE_CHANGED=$(echo "${TYPE_CHANGED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
UNMERGED=$(echo "${UNMERGED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
UNKNOWN=$(echo "${UNKNOWN}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
ALL_CHANGED=$(echo "${ALL_CHANGED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::debug::Added files: $ADDED"
|
echo "::debug::Added files: $ADDED"
|
||||||
|
|
Loading…
Add table
Reference in a new issue