Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9eb683b30 | ||
|
|
3f78450f6c | ||
|
|
b84b6ca11b | ||
|
|
fa48a435b3 | ||
|
|
2a91a6204f | ||
|
|
a6d5b37cba | ||
|
|
3ebf0a6369 | ||
|
|
ddc5ed8372 | ||
|
|
8bf07a8b5d | ||
|
|
09a879748c | ||
|
|
71afc9f3b8 | ||
|
|
bb5d1a8f64 | ||
|
|
23b35e63df | ||
|
|
12ed49be65 |
2
.github/workflows/rebase.yml
vendored
2
.github/workflows/rebase.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
|
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.5
|
- uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.PAT_TOKEN }}
|
token: ${{ secrets.PAT_TOKEN }}
|
||||||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
||||||
|
|||||||
4
.github/workflows/sync-release-version.yml
vendored
4
.github/workflows/sync-release-version.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
update-version:
|
update-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.5
|
- uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Sync release version.
|
- name: Sync release version.
|
||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
output: 'HISTORY.md'
|
output: 'HISTORY.md'
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v3.10.1
|
uses: peter-evans/create-pull-request@v3.11.0
|
||||||
with:
|
with:
|
||||||
base: "main"
|
base: "main"
|
||||||
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"
|
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"
|
||||||
|
|||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
- name: Checkout to branch
|
- name: Checkout to branch
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
uses: reviewdog/action-shellcheck@v1.9
|
uses: reviewdog/action-shellcheck@v1.10
|
||||||
|
|
||||||
test-multiple-repositories:
|
test-multiple-repositories:
|
||||||
name: Test with multiple repositories
|
name: Test with multiple repositories
|
||||||
|
|||||||
2
.github/workflows/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
sync-assets:
|
sync-assets:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.5
|
- uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
36
HISTORY.md
36
HISTORY.md
@@ -1,5 +1,29 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v11.5](https://github.com/tj-actions/changed-files/tree/v11.5) (2021-10-30)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v11.5)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Upgraded to v11.4 [\#239](https://github.com/tj-actions/changed-files/pull/239) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v11.4](https://github.com/tj-actions/changed-files/tree/v11.4) (2021-10-30)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.3...v11.4)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- \[Feature\] Get changed files in all commits in push [\#234](https://github.com/tj-actions/changed-files/issues/234)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Updated README.md [\#238](https://github.com/tj-actions/changed-files/pull/238) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Revert "Update base\_sha to use the last commit on the current branch for push event" [\#237](https://github.com/tj-actions/changed-files/pull/237) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Support retrieving changed files between the last remote commit and the current HEAD for push events [\#236](https://github.com/tj-actions/changed-files/pull/236) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Update base\_sha to use the last commit on the current branch for push event [\#235](https://github.com/tj-actions/changed-files/pull/235) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v11.3 [\#233](https://github.com/tj-actions/changed-files/pull/233) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v11.3](https://github.com/tj-actions/changed-files/tree/v11.3) (2021-10-27)
|
## [v11.3](https://github.com/tj-actions/changed-files/tree/v11.3) (2021-10-27)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.2...v11.3)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.2...v11.3)
|
||||||
@@ -395,7 +419,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...v7)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v7)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -411,13 +435,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](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
|
|
||||||
|
|
||||||
[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)
|
## [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)
|
[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)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -26,6 +26,7 @@ Retrieve all changed files relative to the default branch (`pull_request*` based
|
|||||||
* 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.
|
||||||
* Between the last commit and the current pushed change.
|
* Between the last commit and the current pushed change.
|
||||||
|
* Between the last remote branch commit and the current HEAD.
|
||||||
* Restrict change detection to a subset of files.
|
* Restrict change detection to a subset of files.
|
||||||
* Report on files that have at least one change.
|
* Report on files that have at least one change.
|
||||||
* [Regex pattern](https://www.gnu.org/software/grep/manual/grep.html#Regular-Expressions) matching on a subset of files.
|
* [Regex pattern](https://www.gnu.org/software/grep/manual/grep.html#Regular-Expressions) matching on a subset of files.
|
||||||
@@ -59,7 +60,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
|
|
||||||
- name: List all modified files
|
- name: List all modified files
|
||||||
run: |
|
run: |
|
||||||
@@ -111,7 +112,7 @@ jobs:
|
|||||||
| sha | `string` | `true` | `${{ github.sha }}` | Specify a different <br> commit SHA <br> used for <br> comparing changes |
|
| sha | `string` | `true` | `${{ github.sha }}` | Specify a different <br> commit SHA <br> used for <br> comparing changes |
|
||||||
| files\_from\_source\_file | `string` | `false` | | Source file <br> used to populate <br> the files input |
|
| files\_from\_source\_file | `string` | `false` | | Source file <br> used to populate <br> the files input |
|
||||||
| path | `string` | `false` | | Relative path under <br> `GITHUB_WORKSPACE` <br> to the repository |
|
| path | `string` | `false` | | Relative path under <br> `GITHUB_WORKSPACE` <br> to the repository |
|
||||||
| since\_last\_remote\_commit | `string` | `false` | `false` | Use the last commit on the remote <br> branch as the `base_sha` for push event.<br> (Defaults to the previous commit). |
|
| since\_last\_remote\_commit | `string` | `false` | `false` | Use the last commit on the remote <br> branch as the `base_sha`.<br> (Defaults to the previous commit). |
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
@@ -122,11 +123,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@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
|
|
||||||
- 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@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
|
||||||
@@ -148,7 +149,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@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -186,14 +187,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@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
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@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -202,13 +203,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@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
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@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
with:
|
with:
|
||||||
base_sha: "2096ed0"
|
base_sha: "2096ed0"
|
||||||
|
|
||||||
@@ -220,7 +221,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run changed-files with defaults on the dir1
|
- name: Run changed-files with defaults on the dir1
|
||||||
id: changed-files-for-dir1
|
id: changed-files-for-dir1
|
||||||
uses: tj-actions/changed-files@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
with:
|
with:
|
||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
@@ -229,6 +230,13 @@ jobs:
|
|||||||
for file in ${{ steps.changed-files-for-dir1.outputs.added_files }}; do
|
for file in ${{ steps.changed-files-for-dir1.outputs.added_files }}; do
|
||||||
echo "$file was added"
|
echo "$file was added"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Run changed-files using the last commit on the remote branch
|
||||||
|
id: changed-files-since-last-remote-commit
|
||||||
|
uses: tj-actions/changed-files@v11.5
|
||||||
|
with:
|
||||||
|
since_last_remote_commit: 'true'
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running [pre-commit](https://pre-commit.com/) on all modified files
|
### Running [pre-commit](https://pre-commit.com/) on all modified files
|
||||||
@@ -242,7 +250,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v11.3
|
uses: tj-actions/changed-files@v11.5
|
||||||
|
|
||||||
- name: Pre-commit
|
- name: Pre-commit
|
||||||
uses: pre-commit/action@v2.0.0
|
uses: pre-commit/action@v2.0.0
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ runs:
|
|||||||
- run: |
|
- run: |
|
||||||
if [[ -n "${{ inputs.base_sha }}" ]]; then
|
if [[ -n "${{ inputs.base_sha }}" ]]; then
|
||||||
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
|
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
|
||||||
elif [[ "${{ github.event_name }}" == "push" && -z "${{ inputs.base_sha }}" && "${{ inputs.since_last_remote_commit }}" == "true" ]]; then
|
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" ]]; then
|
||||||
echo "::set-output name=base_sha::${{ github.event.before }}"
|
echo "::set-output name=base_sha::${{ github.event.before }}"
|
||||||
fi
|
fi
|
||||||
id: base-sha
|
id: base-sha
|
||||||
|
|||||||
@@ -119,9 +119,10 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Matching modified files: ${UNIQUE_ALL_MODIFIED}"
|
UNIQUE_ALL_MODIFIED=$(echo "${UNIQUE_ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
if [[ -n "${UNIQUE_ALL_MODIFIED}" ]]; then
|
if [[ -n "${UNIQUE_ALL_MODIFIED}" ]]; then
|
||||||
|
echo "Matching modified files: ${UNIQUE_ALL_MODIFIED}"
|
||||||
echo "::set-output name=any_changed::true"
|
echo "::set-output name=any_changed::true"
|
||||||
else
|
else
|
||||||
echo "::set-output name=any_changed::false"
|
echo "::set-output name=any_changed::false"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.github/workflows/test.yml
|
.github/workflows/test.yml
|
||||||
action.yml
|
action.yml
|
||||||
action.yml
|
action.yml
|
||||||
test/changed-files-list.txt
|
action.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user