Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75933dc40b | ||
|
|
dc688ad0b2 | ||
|
|
5cab6c42e2 | ||
|
|
cc5b16fc9d | ||
|
|
ba01a24d10 | ||
|
|
a48d12ad38 | ||
|
|
dfe8a2779d |
1
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -41,6 +41,7 @@ body:
|
|||||||
label: What OS are you seeing the problem on?
|
label: What OS are you seeing the problem on?
|
||||||
multiple: true
|
multiple: true
|
||||||
options:
|
options:
|
||||||
|
- all
|
||||||
- ubuntu-latest or ubuntu-20.04
|
- ubuntu-latest or ubuntu-20.04
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- macos-latest or macos-10.15
|
- macos-latest or macos-10.15
|
||||||
|
|||||||
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
@@ -108,6 +108,25 @@ jobs:
|
|||||||
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
|
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Run changed-files with specific files comma check duplicates
|
||||||
|
id: changed-files-specific-duplicate-output
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
entrypoint.sh
|
||||||
|
*.sh
|
||||||
|
- name: Verify all_changed_files files has no duplicates
|
||||||
|
if: contains(steps.changed-files-specific-duplicate-output.outputs.all_modified_files, 'entrypoint.sh')
|
||||||
|
run: |
|
||||||
|
ALL_CHANGED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_modified_files }})
|
||||||
|
UNIQUE_ALL_CHANGED_FILES=$(echo "$ALL_CHANGED_FILES" | tr ' ' '\n' | sort -u | xargs)
|
||||||
|
|
||||||
|
if [[ "$ALL_CHANGED_FILES[@]" != "$UNIQUE_ALL_CHANGED_FILES[@]" ]]; then
|
||||||
|
echo "Duplicate output: Expected "$UNIQUE_ALL_CHANGED_FILES" got $ALL_CHANGED_FILES"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Run changed-files with specific files comma separator
|
- name: Run changed-files with specific files comma separator
|
||||||
id: changed-files-specific-comma
|
id: changed-files-specific-comma
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -181,7 +200,7 @@ jobs:
|
|||||||
bash
|
bash
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v4.5
|
uses: tj-actions/branch-names@v4.8
|
||||||
- uses: nrwl/last-successful-commit-action@v1
|
- uses: nrwl/last-successful-commit-action@v1
|
||||||
id: last_successful_commit
|
id: last_successful_commit
|
||||||
with:
|
with:
|
||||||
|
|||||||
34
HISTORY.md
34
HISTORY.md
@@ -1,5 +1,23 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v9.1](https://github.com/tj-actions/changed-files/tree/v9.1) (2021-07-30)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v9...v9.1)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- \[Feature\] any\_changed doesn't capture changes due to deleting files [\#148](https://github.com/tj-actions/changed-files/issues/148)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Detect deleted files via any\_changed output [\#149](https://github.com/tj-actions/changed-files/pull/149) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Update reviewdog/action-shellcheck action to v1.7 [\#147](https://github.com/tj-actions/changed-files/pull/147) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
|
- Upgraded to v9 [\#146](https://github.com/tj-actions/changed-files/pull/146) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v9](https://github.com/tj-actions/changed-files/tree/v9) (2021-07-24)
|
## [v9](https://github.com/tj-actions/changed-files/tree/v9) (2021-07-24)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v8.9...v9)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v8.9...v9)
|
||||||
@@ -8,10 +26,6 @@
|
|||||||
|
|
||||||
- \[BUG\] \<any\_changed doesn't capture changes due to renaming files\> [\#144](https://github.com/tj-actions/changed-files/issues/144)
|
- \[BUG\] \<any\_changed doesn't capture changes due to renaming files\> [\#144](https://github.com/tj-actions/changed-files/issues/144)
|
||||||
|
|
||||||
**Closed issues:**
|
|
||||||
|
|
||||||
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Update `any_changed` to include renamed files. [\#145](https://github.com/tj-actions/changed-files/pull/145) ([jackton1](https://github.com/jackton1))
|
- Update `any_changed` to include renamed files. [\#145](https://github.com/tj-actions/changed-files/pull/145) ([jackton1](https://github.com/jackton1))
|
||||||
@@ -150,7 +164,7 @@
|
|||||||
|
|
||||||
## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09)
|
## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v7)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v7)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -166,13 +180,13 @@
|
|||||||
- Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
|
- Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v6.3)
|
|
||||||
|
|
||||||
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
|
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v6)
|
||||||
|
|
||||||
|
## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6.3)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -12,6 +12,7 @@ Retrieve all changed files relative to the default branch (`pull_request*` based
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
* Easy to debug.
|
||||||
* Boolean output indicating that certain files have been modified.
|
* Boolean output indicating that certain files have been modified.
|
||||||
* List all files that have changed.
|
* List all files that have changed.
|
||||||
* Between the current pull request branch and the default branch.
|
* Between the current pull request branch and the default branch.
|
||||||
@@ -55,7 +56,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
|
|
||||||
- name: List all modified files
|
- name: List all modified files
|
||||||
run: |
|
run: |
|
||||||
@@ -113,11 +114,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files using defaults
|
- name: Get changed files using defaults
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
|
|
||||||
- name: Get changed files using a comma separator
|
- name: Get changed files using a comma separator
|
||||||
id: changed-files-comma
|
id: changed-files-comma
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
|
||||||
@@ -139,7 +140,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get specific changed files
|
- name: Get specific changed files
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -162,14 +163,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Use a source file or list of file(s) to populate to files input.
|
- name: Use a source file or list of file(s) to populate to files input.
|
||||||
id: changed-files-specific-source-file
|
id: changed-files-specific-source-file
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
|
|
||||||
- name: Use a source file or list of file(s) to populate to files input and optionally specify more files.
|
- name: Use a source file or list of file(s) to populate to files input and optionally specify more files.
|
||||||
id: changed-files-specific-source-file-and-specify-files
|
id: changed-files-specific-source-file-and-specify-files
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -178,13 +179,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Use a different commit SHA
|
- name: Use a different commit SHA
|
||||||
id: changed-files-custom-sha
|
id: changed-files-custom-sha
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
sha: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Use a different base SHA
|
- name: Use a different base SHA
|
||||||
id: changed-files-custom-base-sha
|
id: changed-files-custom-base-sha
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
with:
|
with:
|
||||||
base_sha: "2096ed0"
|
base_sha: "2096ed0"
|
||||||
|
|
||||||
@@ -201,7 +202,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v9
|
uses: tj-actions/changed-files@v9.1
|
||||||
|
|
||||||
- name: Pre-commit
|
- name: Pre-commit
|
||||||
uses: pre-commit/action@v2.0.0
|
uses: pre-commit/action@v2.0.0
|
||||||
|
|||||||
@@ -104,25 +104,25 @@ else
|
|||||||
done
|
done
|
||||||
|
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
ADDED=$(echo "${ADDED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
ADDED=$(echo "${ADDED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
COPIED=$(echo "${COPIED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
COPIED=$(echo "${COPIED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
DELETED=$(echo "${DELETED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
DELETED=$(echo "${DELETED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
MODIFIED=$(echo "${MODIFIED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
MODIFIED=$(echo "${MODIFIED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
RENAMED=$(echo "${RENAMED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
RENAMED=$(echo "${RENAMED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
TYPE_CHANGED=$(echo "${TYPE_CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
TYPE_CHANGED=$(echo "${TYPE_CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
UNMERGED=$(echo "${UNMERGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
UNMERGED=$(echo "${UNMERGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
UNKNOWN=$(echo "${UNKNOWN_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
UNKNOWN=$(echo "${UNKNOWN_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
ALL_CHANGED=$(echo "${ALL_CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
ALL_CHANGED=$(echo "${ALL_CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
ALL_MODIFIED_FILES=$(echo "${ALL_MODIFIED_FILES_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
ALL_MODIFIED_FILES=$(echo "${ALL_MODIFIED_FILES_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g' | tr ' ' '\n' | sort -u | xargs)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Added files: $ADDED"
|
echo "Added files: $ADDED"
|
||||||
|
|||||||
Reference in New Issue
Block a user