mirror of
https://github.com/tj-actions/changed-files
synced 2025-01-16 13:56:45 +00:00
Update action.yml
This commit is contained in:
parent
cee7cbf35c
commit
2c3bf3cbc4
1 changed files with 13 additions and 13 deletions
26
action.yml
26
action.yml
|
@ -2,11 +2,11 @@ name: Get modified files
|
|||
description: Get modified files
|
||||
author: tj-actions
|
||||
inputs:
|
||||
token:
|
||||
description: 'GITHUB_TOKEN or a Repo scoped PAT'
|
||||
separator:
|
||||
description: 'Split character for array output'
|
||||
required: true
|
||||
default: ${{ github.token }}
|
||||
|
||||
default: " "
|
||||
|
||||
outputs:
|
||||
added_files:
|
||||
description: List of added files.
|
||||
|
@ -59,15 +59,15 @@ runs:
|
|||
|
||||
HEAD_SHA=$(git rev-parse ${TARGET_BRANCH} || true)
|
||||
|
||||
ADDED=$(git diff --diff-filter=A --name-only "$HEAD_SHA" | xargs )
|
||||
COPIED=$(git diff --diff-filter=C --name-only "$HEAD_SHA" | xargs )
|
||||
DELETED=$(git diff --diff-filter=D --name-only "$HEAD_SHA" | xargs )
|
||||
MODIFIED=$(git diff --diff-filter=M --name-only "$HEAD_SHA" | xargs )
|
||||
RENAMED=$(git diff --diff-filter=R --name-only "$HEAD_SHA" | xargs )
|
||||
CHANGED=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | xargs )
|
||||
UNMERGED=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | xargs )
|
||||
UNKNOWN=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | xargs )
|
||||
ALL_CHANGED=$(git diff --diff-filter='*' --name-only "$HEAD_SHA" | xargs )
|
||||
ADDED=$(git diff --diff-filter=A --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
COPIED=$(git diff --diff-filter=C --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
DELETED=$(git diff --diff-filter=D --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
MODIFIED=$(git diff --diff-filter=M --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
RENAMED=$(git diff --diff-filter=R --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
CHANGED=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
UNMERGED=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
UNKNOWN=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
ALL_CHANGED=$(git diff --diff-filter='*' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" )
|
||||
|
||||
echo "Getting diff..."
|
||||
echo "::set-output name=added_files::$ADDED"
|
||||
|
|
Loading…
Reference in a new issue