Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f56e736bed | ||
|
|
0d89cb5d73 | ||
|
|
ef4467c8b8 | ||
|
|
16f1061f41 | ||
|
|
ee22dfaf73 | ||
|
|
38982dbe41 | ||
|
|
064d858f63 | ||
|
|
31bc57ef04 | ||
|
|
9c1a181e67 | ||
|
|
b160683938 | ||
|
|
78b8e06a07 | ||
|
|
8ddde738a5 |
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: Checkout to branch
|
||||
uses: actions/checkout@v2
|
||||
- name: shellcheck
|
||||
uses: reviewdog/action-shellcheck@v1.12
|
||||
uses: reviewdog/action-shellcheck@v1.13
|
||||
|
||||
test-multiple-repositories:
|
||||
name: Test with multiple repositories
|
||||
|
||||
33
HISTORY.md
33
HISTORY.md
@@ -1,8 +1,24 @@
|
||||
# Changelog
|
||||
|
||||
## [v1.1.4](https://github.com/tj-actions/changed-files/tree/v1.1.4) (2021-12-14)
|
||||
## [v2.0.0](https://github.com/tj-actions/changed-files/tree/v2.0.0) (2021-12-17)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.9...v1.1.4)
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12...v2.0.0)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- \[BUG\] Files input doesn't work when running with `act` [\#251](https://github.com/tj-actions/changed-files/issues/251)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Breaking changes in patch updates? [\#288](https://github.com/tj-actions/changed-files/issues/288)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Upgraded to v12 [\#287](https://github.com/tj-actions/changed-files/pull/287) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [v12](https://github.com/tj-actions/changed-files/tree/v12) (2021-12-14)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.9...v12)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
@@ -18,6 +34,7 @@
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Upgraded to v1.1.4 [\#286](https://github.com/tj-actions/changed-files/pull/286) ([jackton1](https://github.com/jackton1))
|
||||
- \[PR 2\]: Added support for listing all\_modified\_files. [\#285](https://github.com/tj-actions/changed-files/pull/285) ([jackton1](https://github.com/jackton1))
|
||||
- Update peter-evans/create-pull-request action to v3.12.0 [\#284](https://github.com/tj-actions/changed-files/pull/284) ([renovate[bot]](https://github.com/apps/renovate))
|
||||
- \[PR 1\]: Renamed all\_modified\_files to all\_changed\_files [\#283](https://github.com/tj-actions/changed-files/pull/283) ([jackton1](https://github.com/jackton1))
|
||||
@@ -114,7 +131,7 @@
|
||||
|
||||
## [v1.2.1](https://github.com/tj-actions/changed-files/tree/v1.2.1) (2021-11-08)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.5...v1.2.1)
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.0...v1.2.1)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
@@ -128,13 +145,13 @@
|
||||
- Update actions/checkout action to v2.4.0 [\#243](https://github.com/tj-actions/changed-files/pull/243) ([renovate[bot]](https://github.com/apps/renovate))
|
||||
- Upgraded to v11.5 [\#241](https://github.com/tj-actions/changed-files/pull/241) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [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/v1.2.0...v11.5)
|
||||
|
||||
## [v1.2.0](https://github.com/tj-actions/changed-files/tree/v1.2.0) (2021-10-30)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v1.2.0)
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.5...v1.2.0)
|
||||
|
||||
## [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:**
|
||||
|
||||
|
||||
22
README.md
22
README.md
@@ -63,7 +63,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
@@ -140,11 +140,11 @@ Support this project with a :star:
|
||||
|
||||
- name: Get changed files using defaults
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
|
||||
- name: Get changed files using a comma separator
|
||||
id: changed-files-comma
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
with:
|
||||
separator: ","
|
||||
|
||||
@@ -166,7 +166,7 @@ Support this project with a :star:
|
||||
|
||||
- name: Get specific changed files
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
with:
|
||||
files: |
|
||||
my-file.txt
|
||||
@@ -204,14 +204,14 @@ Support this project with a :star:
|
||||
|
||||
- name: Use a source file or list of file(s) to populate to files input.
|
||||
id: changed-files-specific-source-file
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
with:
|
||||
files_from_source_file: |
|
||||
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.
|
||||
id: changed-files-specific-source-file-and-specify-files
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
with:
|
||||
files_from_source_file: |
|
||||
test/changed-files-list.txt
|
||||
@@ -220,13 +220,13 @@ Support this project with a :star:
|
||||
|
||||
- name: Use a different commit SHA
|
||||
id: changed-files-custom-sha
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
with:
|
||||
sha: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Use a different base SHA
|
||||
id: changed-files-custom-base-sha
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
with:
|
||||
base_sha: "2096ed0"
|
||||
|
||||
@@ -238,7 +238,7 @@ Support this project with a :star:
|
||||
|
||||
- name: Run changed-files with defaults on the dir1
|
||||
id: changed-files-for-dir1
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
with:
|
||||
path: dir1
|
||||
|
||||
@@ -250,7 +250,7 @@ Support this project with a :star:
|
||||
|
||||
- name: Run changed-files using the last commit on the remote branch
|
||||
id: changed-files-since-last-remote-commit
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
with:
|
||||
since_last_remote_commit: 'true'
|
||||
|
||||
@@ -267,7 +267,7 @@ Support this project with a :star:
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v1.1.4
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
|
||||
- name: Pre-commit
|
||||
uses: pre-commit/action@v2.0.0
|
||||
|
||||
@@ -126,10 +126,8 @@ else
|
||||
ALL_OTHER_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||
UNIQUE_ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||
|
||||
UNIQUE_ALL_CHANGED=$(echo "${UNIQUE_ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||
|
||||
if [[ -n "${UNIQUE_ALL_CHANGED}" ]]; then
|
||||
echo "Matching modified files: ${UNIQUE_ALL_CHANGED}"
|
||||
echo "Matching changed files: ${UNIQUE_ALL_CHANGED}"
|
||||
echo "::set-output name=any_changed::true"
|
||||
else
|
||||
echo "::set-output name=any_changed::false"
|
||||
@@ -156,8 +154,6 @@ else
|
||||
ALL_OTHER_MODIFIED=$(git diff --diff-filter="ACMRD" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||
UNIQUE_ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||
|
||||
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
|
||||
echo "Matching modified files: ${UNIQUE_ALL_MODIFIED}"
|
||||
echo "::set-output name=any_modified::true"
|
||||
@@ -195,7 +191,7 @@ else
|
||||
|
||||
if [[ -n $ALL_OTHER_DELETED ]]; then
|
||||
if [[ -n "$UNIQUE_ALL_DELETED" ]]; then
|
||||
OTHER_DELETED=$(echo "${ALL_OTHER_DELETED}|${UNIQUE_ALL_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||
OTHER_DELETED=$(echo "${ALL_OTHER_DELETED}|${UNIQUE_ALL_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||
else
|
||||
OTHER_DELETED=$ALL_OTHER_DELETED
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user