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 echo $file
done done
- name: Run step when README.md changes - 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: | 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 - name: Run changed-files with comma separator
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
id: changed-files-comma 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 }})$//') 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 }})$//') 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 }})$//') 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 "Getting diff..."
echo "::set-output name=added_files::$ADDED" echo "::set-output name=added_files::$ADDED"