3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-03-05 21:06:25 +00:00

Merge pull request #11 from tj-actions/updated-the-all-changed

This commit is contained in:
Tonye Jack 2021-04-02 09:03:22 -04:00 committed by GitHub
commit 049242589c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -30,9 +30,9 @@ jobs:
echo $file
done
- name: Run step when README.md changes
if: contains(${{ steps.changed-files.outputs.modified_files }}, "README.md")
if: contains(steps.changed-files.outputs.modified_files, 'README.md')
run: |
echo "Your README.md has been modified."
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
- name: Run changed-files with comma separator
if: github.event_name == 'pull_request'
id: changed-files-comma

View file

@ -63,7 +63,7 @@ runs:
CHANGED=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
UNMERGED=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
UNKNOWN=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
ALL_CHANGED=$(git diff --diff-filter='*' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
ALL_CHANGED=$(git diff --diff-filter='*ACDMRTUX' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
echo "Getting diff..."
echo "::set-output name=added_files::$ADDED"