Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c1a181e67 | ||
|
|
b160683938 | ||
|
|
78b8e06a07 | ||
|
|
8ddde738a5 | ||
|
|
019a09d36e | ||
|
|
c78c155cf0 | ||
|
|
20765a994f | ||
|
|
8a6f638464 | ||
|
|
c4ea3ea9f8 | ||
|
|
243fa32395 | ||
|
|
3c15e7e4d4 | ||
|
|
3bd96ae803 | ||
|
|
3b638a9708 |
2
.github/workflows/sync-release-version.yml
vendored
2
.github/workflows/sync-release-version.yml
vendored
@@ -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.11.0
|
uses: peter-evans/create-pull-request@v3.12.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 }}"
|
||||||
|
|||||||
103
.github/workflows/test.yml
vendored
103
.github/workflows/test.yml
vendored
@@ -228,7 +228,7 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_changed for specific files
|
- name: Verify any_changed for specific files
|
||||||
if: "!contains(steps.changed-files-specific.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
|
||||||
@@ -236,6 +236,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Verify any_modified for specific files
|
||||||
|
if: "!contains(steps.changed-files-specific.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, '.github/workflows/test.yml')"
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.changed-files-specific.outputs.any_modified }}" != "false" ]]; then
|
||||||
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_modified }})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Verify any_deleted for specific files
|
- name: Verify any_deleted for specific files
|
||||||
if: "!contains(steps.changed-files-specific.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
@@ -252,10 +261,22 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
entrypoint.sh
|
entrypoint.sh
|
||||||
*.sh
|
*.sh
|
||||||
- name: Verify all_changed_and_modified_files files has no duplicates
|
- name: Verify all_changed_files files has no duplicates
|
||||||
if: contains(steps.changed-files-specific-duplicate-output.outputs.all_modified_files, 'entrypoint.sh')
|
if: contains(steps.changed-files-specific-duplicate-output.outputs.all_changed_files, 'entrypoint.sh')
|
||||||
run: |
|
run: |
|
||||||
ALL_CHANGED_AND_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_modified_files }})
|
ALL_CHANGED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_changed_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: Verify all_changed_and_modified_files files has no duplicates
|
||||||
|
if: contains(steps.changed-files-specific-duplicate-output.outputs.all_changed_and_modified_files, 'entrypoint.sh')
|
||||||
|
run: |
|
||||||
|
ALL_CHANGED_AND_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_changed_and_modified_files }})
|
||||||
UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES=$(echo "$ALL_CHANGED_AND_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
|
UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES=$(echo "$ALL_CHANGED_AND_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
|
||||||
|
|
||||||
if [[ "$ALL_CHANGED_AND_MODIFIED_FILES[@]" != "$UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES[@]" ]]; then
|
if [[ "$ALL_CHANGED_AND_MODIFIED_FILES[@]" != "$UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES[@]" ]]; then
|
||||||
@@ -264,6 +285,18 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Verify all_modified_files files has no duplicates
|
||||||
|
if: contains(steps.changed-files-specific-duplicate-output.outputs.all_modified_files, 'entrypoint.sh')
|
||||||
|
run: |
|
||||||
|
ALL_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_modified_files }})
|
||||||
|
UNIQUE_ALL_MODIFIED_FILES=$(echo "$ALL_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
|
||||||
|
|
||||||
|
if [[ "$ALL_MODIFIED_FILES[@]" != "$UNIQUE_ALL_MODIFIED_FILES[@]" ]]; then
|
||||||
|
echo "Duplicate output: Expected "$UNIQUE_ALL_MODIFIED_FILES" got $ALL_MODIFIED_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: ./
|
||||||
@@ -278,7 +311,7 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_changed files comma separator
|
- name: Verify any_changed files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-comma.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_changed_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-comma.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-comma.outputs.any_changed }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_changed }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_changed }})"
|
||||||
@@ -286,6 +319,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Verify any_modified files comma separator
|
||||||
|
if: "!contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, '.github/workflows/test.yml')"
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.changed-files-specific-comma.outputs.any_modified }}" != "false" ]]; then
|
||||||
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_modified }})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Verify any_deleted files comma separator
|
- name: Verify any_deleted files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-comma.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-comma.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
@@ -309,7 +351,7 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_changed files comma separator
|
- name: Verify any_changed files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-pipe.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_modified_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-pipe.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_changed_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_changed }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_changed }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_changed }})"
|
||||||
@@ -317,6 +359,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Verify any_modified files comma separator
|
||||||
|
if: "!contains(steps.changed-files-specific-pipe.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_modified_files, '.github/workflows/test.yml')"
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_modified }}" != "false" ]]; then
|
||||||
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_modified }})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Verify any_deleted files comma separator
|
- name: Verify any_deleted files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-pipe.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.deleted_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-pipe.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.deleted_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
@@ -340,7 +391,7 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_changed files comma separator
|
- name: Verify any_changed files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_changed }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_changed }})"
|
||||||
@@ -348,6 +399,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Verify any_modified files comma separator
|
||||||
|
if: "!contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, '.github/workflows/test.yml')"
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.changed-files-specific.outputs.any_modified }}" != "false" ]]; then
|
||||||
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_modified }})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Verify any_deleted files comma separator
|
- name: Verify any_deleted files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
@@ -367,6 +427,20 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
.github/workflows/rebase.yml
|
.github/workflows/rebase.yml
|
||||||
- name: Verify any_changed from source files
|
- name: Verify any_changed from source files
|
||||||
|
if: |
|
||||||
|
(
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'action.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/rebase.yml')
|
||||||
|
)
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
|
||||||
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_changed }})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Verify any_modified from source files
|
||||||
if: |
|
if: |
|
||||||
(
|
(
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'action.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'action.yml') &&
|
||||||
@@ -374,8 +448,8 @@ jobs:
|
|||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/rebase.yml')
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/rebase.yml')
|
||||||
)
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_modified }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_changed }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_modified }})"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
@@ -407,7 +481,7 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_changed files comma separator
|
- name: Verify any_changed files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }})"
|
||||||
@@ -415,6 +489,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Verify any_modified files comma separator
|
||||||
|
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '.github/workflows/test.yml')"
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }}" != "false" ]]; then
|
||||||
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Verify any_deleted files with comma separator
|
- name: Verify any_deleted files with comma separator
|
||||||
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, '.github/workflows/test.yml')"
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
69
HISTORY.md
69
HISTORY.md
@@ -1,5 +1,58 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v12](https://github.com/tj-actions/changed-files/tree/v12) (2021-12-14)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.1.4...v12)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Upgraded to v1.1.4 [\#286](https://github.com/tj-actions/changed-files/pull/286) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v1.1.4](https://github.com/tj-actions/changed-files/tree/v1.1.4) (2021-12-14)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.9...v1.1.4)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- \[Feature\] Add "any\_modified", "other\_modified\_files" and "all\_modified" outputs containing created, edit, renamed, or deleted files [\#282](https://github.com/tj-actions/changed-files/issues/282)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] Failed to get change files on pull\_request merge event [\#281](https://github.com/tj-actions/changed-files/issues/281)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- \[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))
|
||||||
|
- Upgraded to v11.9 [\#280](https://github.com/tj-actions/changed-files/pull/280) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v11.9](https://github.com/tj-actions/changed-files/tree/v11.9) (2021-12-04)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.1...v11.9)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Can't get `since_last_remote_commit` to work properly on pull\_request event [\#276](https://github.com/tj-actions/changed-files/issues/276)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Upgraded to v1.3.1 [\#279](https://github.com/tj-actions/changed-files/pull/279) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v1.3.1](https://github.com/tj-actions/changed-files/tree/v1.3.1) (2021-12-04)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.8...v1.3.1)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fixed regression bug with base\_sha for pull\_request [\#278](https://github.com/tj-actions/changed-files/pull/278) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Prevent outputting remote not found error message. [\#277](https://github.com/tj-actions/changed-files/pull/277) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v11.8 [\#275](https://github.com/tj-actions/changed-files/pull/275) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v11.8](https://github.com/tj-actions/changed-files/tree/v11.8) (2021-12-04)
|
## [v11.8](https://github.com/tj-actions/changed-files/tree/v11.8) (2021-12-04)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.0...v11.8)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.0...v11.8)
|
||||||
@@ -52,10 +105,6 @@
|
|||||||
|
|
||||||
- \[BUG\] pull request with `since_last_remote_commit = true` returns fatal: bad object [\#253](https://github.com/tj-actions/changed-files/issues/253)
|
- \[BUG\] pull request with `since_last_remote_commit = true` returns fatal: bad object [\#253](https://github.com/tj-actions/changed-files/issues/253)
|
||||||
|
|
||||||
**Closed issues:**
|
|
||||||
|
|
||||||
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Updated git fetch to pull the last remote commit [\#254](https://github.com/tj-actions/changed-files/pull/254) ([jackton1](https://github.com/jackton1))
|
- Updated git fetch to pull the last remote commit [\#254](https://github.com/tj-actions/changed-files/pull/254) ([jackton1](https://github.com/jackton1))
|
||||||
@@ -73,7 +122,7 @@
|
|||||||
|
|
||||||
## [v1.2.1](https://github.com/tj-actions/changed-files/tree/v1.2.1) (2021-11-08)
|
## [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:**
|
**Implemented enhancements:**
|
||||||
|
|
||||||
@@ -87,13 +136,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))
|
- 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))
|
- 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)
|
## [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:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
|||||||
52
README.md
52
README.md
@@ -19,7 +19,7 @@ Retrieve all changed files relative to the default branch (`pull_request*` based
|
|||||||
|
|
||||||
* Fast execution (0-2 seconds on average).
|
* Fast execution (0-2 seconds on average).
|
||||||
* Easy to debug.
|
* Easy to debug.
|
||||||
* Boolean output indicating that certain files have been modified.
|
* Boolean output indicating that certain files have been changed.
|
||||||
* Multiple repositories.
|
* Multiple repositories.
|
||||||
* Self hosted runners.
|
* Self hosted runners.
|
||||||
* GitHub Enterprise Server.
|
* GitHub Enterprise Server.
|
||||||
@@ -33,6 +33,16 @@ Retrieve all changed files relative to the default branch (`pull_request*` based
|
|||||||
* 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.
|
||||||
|
|
||||||
|
|
||||||
|
> NOTE: :warning:
|
||||||
|
> * All users referencing the legacy `v1.x.x` version, are required to switch to `v*` or `v*.*` versioning semantic.
|
||||||
|
> * A breaking change was introduced in `v1.x.x` legacy version, which is no longer supported and future updates would only be made to `v*` or `v*.*`.
|
||||||
|
|
||||||
|
| Legacy version | Recommended version |
|
||||||
|
|---------------------|-----------------------|
|
||||||
|
| `v1.x.x` | `v12` |
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
> NOTE: :warning:
|
> NOTE: :warning:
|
||||||
@@ -63,12 +73,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v11.8
|
uses: tj-actions/changed-files@v12
|
||||||
|
|
||||||
- name: List all modified files
|
- name: List all changed files
|
||||||
run: |
|
run: |
|
||||||
for file in ${{ steps.changed-files.outputs.all_modified_files }}; do
|
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||||
echo "$file was modified"
|
echo "$file was changed"
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -98,12 +108,16 @@ Support this project with a :star:
|
|||||||
| Output | type | example | description |
|
| Output | type | example | description |
|
||||||
|:--------------------:|:------------:|:----------------------------------:|:----------------------------------------:|
|
|:--------------------:|:------------:|:----------------------------------:|:----------------------------------------:|
|
||||||
| any\_changed | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has changed. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
| any\_changed | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has changed. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
||||||
| only\_changed | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input have changed. (ACMR) |
|
| only\_changed | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has changed. (ACMR) |
|
||||||
| other\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Select all other changed files <br/> not listed in the files input <br /> i.e. *a combination of all added, <br /> copied and modified files (ACMR)* |
|
| other\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Select all other changed files <br/> not listed in the files input <br /> i.e. *a combination of all added, <br /> copied and modified files (ACMR)* |
|
||||||
|
| any\_modified | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been modified. <br /> i.e. *using a combination of all added, <br />copied, modified, renamed, and deleted files (ACMRD)* |
|
||||||
|
| only\_modified | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been modified. (ACMRD) |
|
||||||
|
| other\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select all other modified files <br/> not listed in the files input <br /> i.e. *a combination of all added, <br /> copied, modified, and deleted files (ACMRD)* |
|
||||||
| any\_deleted | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been deleted. (D) |
|
| any\_deleted | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been deleted. (D) |
|
||||||
| only\_deleted | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been deleted. (D) |
|
| only\_deleted | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been deleted. (D) |
|
||||||
| other\_deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Select all other deleted files <br/> not listed in the files input <br /> i.e. *a combination of all deleted files (D)* |
|
| other\_deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Select all other deleted files <br/> not listed in the files input <br /> i.e. *a combination of all deleted files (D)* |
|
||||||
| all\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select all modified files <br /> i.e. *a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
| all\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Select all changed files <br /> i.e. *a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
||||||
|
| all\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select all changed files <br /> i.e. *a combination of all added, <br />copied, modified, renamed and deleted files (ACMRD)* |
|
||||||
| all\_changed\_and\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select all changed <br /> and modified files <br /> i.e. *a combination of (ACMRDTUX)* |
|
| all\_changed\_and\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select all changed <br /> and modified files <br /> i.e. *a combination of (ACMRDTUX)* |
|
||||||
| added\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Added (A) |
|
| added\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Added (A) |
|
||||||
| copied\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Copied (C) |
|
| copied\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Copied (C) |
|
||||||
@@ -125,7 +139,7 @@ Support this project with a :star:
|
|||||||
| 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`.<br> (Defaults to the previous commit). <br /> NOTE: This requires <br /> `fetch-depth: 0`|
|
| 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). <br /> NOTE: This requires <br /> `fetch-depth: 0` <br /> with `actions/checkout@v2` |
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
@@ -136,11 +150,11 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Get changed files using defaults
|
- name: Get changed files using defaults
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v11.8
|
uses: tj-actions/changed-files@v12
|
||||||
|
|
||||||
- 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.8
|
uses: tj-actions/changed-files@v12
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
|
||||||
@@ -162,7 +176,7 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Get specific changed files
|
- name: Get specific changed files
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v11.8
|
uses: tj-actions/changed-files@v12
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -200,14 +214,14 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- 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.8
|
uses: tj-actions/changed-files@v12
|
||||||
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.8
|
uses: tj-actions/changed-files@v12
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -216,13 +230,13 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- 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.8
|
uses: tj-actions/changed-files@v12
|
||||||
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.8
|
uses: tj-actions/changed-files@v12
|
||||||
with:
|
with:
|
||||||
base_sha: "2096ed0"
|
base_sha: "2096ed0"
|
||||||
|
|
||||||
@@ -234,7 +248,7 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- 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.8
|
uses: tj-actions/changed-files@v12
|
||||||
with:
|
with:
|
||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
@@ -246,7 +260,7 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Run changed-files using the last commit on the remote branch
|
- name: Run changed-files using the last commit on the remote branch
|
||||||
id: changed-files-since-last-remote-commit
|
id: changed-files-since-last-remote-commit
|
||||||
uses: tj-actions/changed-files@v11.8
|
uses: tj-actions/changed-files@v12
|
||||||
with:
|
with:
|
||||||
since_last_remote_commit: 'true'
|
since_last_remote_commit: 'true'
|
||||||
|
|
||||||
@@ -263,12 +277,12 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v11.8
|
uses: tj-actions/changed-files@v12
|
||||||
|
|
||||||
- name: Pre-commit
|
- name: Pre-commit
|
||||||
uses: pre-commit/action@v2.0.0
|
uses: pre-commit/action@v2.0.0
|
||||||
with:
|
with:
|
||||||
extra_args: -v --hook-stage push --files ${{ steps.changed-files.outputs.all_modified_files }}
|
extra_args: -v --hook-stage push --files ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
token: ${{ secrets.github_token }}
|
token: ${{ secrets.github_token }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
18
action.yml
18
action.yml
@@ -62,9 +62,9 @@ outputs:
|
|||||||
all_changed_and_modified_files:
|
all_changed_and_modified_files:
|
||||||
description: List of all changed files.
|
description: List of all changed files.
|
||||||
value: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
|
value: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
|
||||||
all_modified_files:
|
all_changed_files:
|
||||||
description: List of all copied modified and added files.
|
description: List of all copied, modified, and added files.
|
||||||
value: ${{ steps.changed-files.outputs.all_modified_files }}
|
value: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
any_changed:
|
any_changed:
|
||||||
description: Return true only when any files provided using the files input have changed.
|
description: Return true only when any files provided using the files input have changed.
|
||||||
value: ${{ steps.changed-files.outputs.any_changed }}
|
value: ${{ steps.changed-files.outputs.any_changed }}
|
||||||
@@ -74,6 +74,18 @@ outputs:
|
|||||||
other_changed_files:
|
other_changed_files:
|
||||||
description: Return list of changed files not listed in the files input.
|
description: Return list of changed files not listed in the files input.
|
||||||
value: ${{ steps.changed-files.outputs.other_changed_files }}
|
value: ${{ steps.changed-files.outputs.other_changed_files }}
|
||||||
|
all_modified_files:
|
||||||
|
description: List of all copied, modified, added and deleted files.
|
||||||
|
value: ${{ steps.changed-files.outputs.all_modified_files }}
|
||||||
|
any_modified:
|
||||||
|
description: Return true only when any files provided using the files input have been modified.
|
||||||
|
value: ${{ steps.changed-files.outputs.any_modified }}
|
||||||
|
only_modified:
|
||||||
|
description: Return true when all files provided using the files input have been modified.
|
||||||
|
value: ${{ steps.changed-files.outputs.only_modified }}
|
||||||
|
other_modified_files:
|
||||||
|
description: Return list of modified files not listed in the files input.
|
||||||
|
value: ${{ steps.changed-files.outputs.other_modified_files }}
|
||||||
any_deleted:
|
any_deleted:
|
||||||
description: Return true only when any files provided using the files input have been deleted.
|
description: Return true only when any files provided using the files input have been deleted.
|
||||||
value: ${{ steps.changed-files.outputs.any_deleted }}
|
value: ${{ steps.changed-files.outputs.any_deleted }}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ fi
|
|||||||
|
|
||||||
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::warning::Unable to locate the current sha: $CURRENT_SHA"
|
echo "::warning::Unable to locate the current sha: $CURRENT_SHA"
|
||||||
echo "::warning::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage"
|
echo "::warning::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage"
|
||||||
@@ -104,7 +103,8 @@ if [[ -z "${INPUT_FILES[*]}" ]]; then
|
|||||||
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED_AND_MODIFIED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED_AND_MODIFIED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_MODIFIED=$(git diff --diff-filter="ACMRD" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
else
|
else
|
||||||
echo "Input files: ${INPUT_FILES[*]}"
|
echo "Input files: ${INPUT_FILES[*]}"
|
||||||
|
|
||||||
@@ -120,11 +120,51 @@ else
|
|||||||
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED_AND_MODIFIED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED_AND_MODIFIED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_MODIFIED=$(git diff --diff-filter="ACMRD" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
ALL_OTHER_MODIFIED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
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 changed files: ${UNIQUE_ALL_CHANGED}"
|
||||||
|
echo "::set-output name=any_changed::true"
|
||||||
|
else
|
||||||
|
echo "::set-output name=any_changed::false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $ALL_OTHER_CHANGED ]]; then
|
||||||
|
if [[ -n "$UNIQUE_ALL_CHANGED" ]]; then
|
||||||
|
OTHER_CHANGED=$(echo "${ALL_OTHER_CHANGED}|${UNIQUE_ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
OTHER_CHANGED=$ALL_OTHER_CHANGED
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
|
if [[ -n "${OTHER_CHANGED}" ]]; then
|
||||||
|
echo "Non Matching changed files: ${OTHER_CHANGED}"
|
||||||
|
echo "::set-output name=only_changed::false"
|
||||||
|
echo "::set-output name=other_changed_files::$OTHER_CHANGED"
|
||||||
|
elif [[ -n "${UNIQUE_ALL_CHANGED}" ]]; then
|
||||||
|
echo "::set-output name=only_changed::true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
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 "${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"
|
||||||
|
else
|
||||||
|
echo "::set-output name=any_modified::false"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n $ALL_OTHER_MODIFIED ]]; then
|
if [[ -n $ALL_OTHER_MODIFIED ]]; then
|
||||||
if [[ -n "$UNIQUE_ALL_MODIFIED" ]]; then
|
if [[ -n "$UNIQUE_ALL_MODIFIED" ]]; then
|
||||||
OTHER_MODIFIED=$(echo "${ALL_OTHER_MODIFIED}|${UNIQUE_ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
OTHER_MODIFIED=$(echo "${ALL_OTHER_MODIFIED}|${UNIQUE_ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
@@ -133,28 +173,26 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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_changed::true"
|
|
||||||
else
|
|
||||||
echo "::set-output name=any_changed::false"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
if [[ -n "${OTHER_MODIFIED}" ]]; then
|
if [[ -n "${OTHER_MODIFIED}" ]]; then
|
||||||
echo "Non Matching modified files: ${OTHER_MODIFIED}"
|
echo "Non Matching modified files: ${OTHER_MODIFIED}"
|
||||||
echo "::set-output name=only_changed::false"
|
echo "::set-output name=only_modified::false"
|
||||||
echo "::set-output name=other_changed_files::$OTHER_MODIFIED"
|
echo "::set-output name=other_modified_files::$OTHER_MODIFIED"
|
||||||
elif [[ -n "${UNIQUE_ALL_MODIFIED}" ]]; then
|
elif [[ -n "${UNIQUE_ALL_MODIFIED}" ]]; then
|
||||||
echo "::set-output name=only_changed::true"
|
echo "::set-output name=only_modified::true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ALL_OTHER_DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_OTHER_DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNIQUE_ALL_DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNIQUE_ALL_DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
|
if [[ -n "${UNIQUE_ALL_DELETED}" ]]; then
|
||||||
|
echo "Matching deleted files: ${UNIQUE_ALL_DELETED}"
|
||||||
|
echo "::set-output name=any_deleted::true"
|
||||||
|
else
|
||||||
|
echo "::set-output name=any_deleted::false"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n $ALL_OTHER_DELETED ]]; then
|
if [[ -n $ALL_OTHER_DELETED ]]; then
|
||||||
if [[ -n "$UNIQUE_ALL_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}')
|
||||||
@@ -163,14 +201,6 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Matching deleted files: ${UNIQUE_ALL_DELETED}"
|
|
||||||
|
|
||||||
if [[ -n "${UNIQUE_ALL_DELETED}" ]]; then
|
|
||||||
echo "::set-output name=any_deleted::true"
|
|
||||||
else
|
|
||||||
echo "::set-output name=any_deleted::false"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
if [[ -n "${OTHER_DELETED}" ]]; then
|
if [[ -n "${OTHER_DELETED}" ]]; then
|
||||||
@@ -190,6 +220,7 @@ else
|
|||||||
UNMERGED=$(echo "${UNMERGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNMERGED=$(echo "${UNMERGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNKNOWN=$(echo "${UNKNOWN}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNKNOWN=$(echo "${UNKNOWN}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -201,7 +232,8 @@ echo "Renamed files: $RENAMED"
|
|||||||
echo "Type Changed files: $TYPE_CHANGED"
|
echo "Type Changed files: $TYPE_CHANGED"
|
||||||
echo "Unmerged files: $UNMERGED"
|
echo "Unmerged files: $UNMERGED"
|
||||||
echo "Unknown files: $UNKNOWN"
|
echo "Unknown files: $UNKNOWN"
|
||||||
echo "All changed files: $ALL_CHANGED_AND_MODIFIED"
|
echo "All changed and modified files: $ALL_CHANGED_AND_MODIFIED"
|
||||||
|
echo "All changed files: $ALL_CHANGED"
|
||||||
echo "All modified files: $ALL_MODIFIED"
|
echo "All modified files: $ALL_MODIFIED"
|
||||||
|
|
||||||
git remote remove temp_changed_files
|
git remote remove temp_changed_files
|
||||||
@@ -215,6 +247,7 @@ echo "::set-output name=type_changed_files::$TYPE_CHANGED"
|
|||||||
echo "::set-output name=unmerged_files::$UNMERGED"
|
echo "::set-output name=unmerged_files::$UNMERGED"
|
||||||
echo "::set-output name=unknown_files::$UNKNOWN"
|
echo "::set-output name=unknown_files::$UNKNOWN"
|
||||||
echo "::set-output name=all_changed_and_modified_files::$ALL_CHANGED_AND_MODIFIED"
|
echo "::set-output name=all_changed_and_modified_files::$ALL_CHANGED_AND_MODIFIED"
|
||||||
|
echo "::set-output name=all_changed_files::$ALL_CHANGED"
|
||||||
echo "::set-output name=all_modified_files::$ALL_MODIFIED"
|
echo "::set-output name=all_modified_files::$ALL_MODIFIED"
|
||||||
|
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|||||||
Reference in New Issue
Block a user