Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
271468ecaf | ||
|
|
5b338faafa | ||
|
|
b73d4f8d3f | ||
|
|
9d48b7acf4 | ||
|
|
2458fea93e | ||
|
|
539c9b2f0c | ||
|
|
1bf2f9775d | ||
|
|
6be19fd726 |
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.12.0
|
uses: peter-evans/create-pull-request@v3.12.1
|
||||||
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/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3.12.1
|
||||||
with:
|
with:
|
||||||
base: "main"
|
base: "main"
|
||||||
title: "Updated README.md"
|
title: "Updated README.md"
|
||||||
|
|||||||
44
HISTORY.md
44
HISTORY.md
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v14.1](https://github.com/tj-actions/changed-files/tree/v14.1) (2022-01-26)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.0.1...v14.1)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Upgraded to v4.0.1 [\#331](https://github.com/tj-actions/changed-files/pull/331) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v4.0.1](https://github.com/tj-actions/changed-files/tree/v4.0.1) (2022-01-26)
|
## [v4.0.1](https://github.com/tj-actions/changed-files/tree/v4.0.1) (2022-01-26)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v14...v4.0.1)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v14...v4.0.1)
|
||||||
@@ -37,7 +45,7 @@
|
|||||||
|
|
||||||
## [v3.0.2](https://github.com/tj-actions/changed-files/tree/v3.0.2) (2022-01-25)
|
## [v3.0.2](https://github.com/tj-actions/changed-files/tree/v3.0.2) (2022-01-25)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v13.1...v3.0.2)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.1...v3.0.2)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
@@ -55,13 +63,13 @@
|
|||||||
- Upgraded to v13.1 [\#316](https://github.com/tj-actions/changed-files/pull/316) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v13.1 [\#316](https://github.com/tj-actions/changed-files/pull/316) ([jackton1](https://github.com/jackton1))
|
||||||
- Upgraded to v3.0.1 [\#315](https://github.com/tj-actions/changed-files/pull/315) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v3.0.1 [\#315](https://github.com/tj-actions/changed-files/pull/315) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v13.1](https://github.com/tj-actions/changed-files/tree/v13.1) (2022-01-09)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.1...v13.1)
|
|
||||||
|
|
||||||
## [v3.0.1](https://github.com/tj-actions/changed-files/tree/v3.0.1) (2022-01-09)
|
## [v3.0.1](https://github.com/tj-actions/changed-files/tree/v3.0.1) (2022-01-09)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.0...v3.0.1)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v13.1...v3.0.1)
|
||||||
|
|
||||||
|
## [v13.1](https://github.com/tj-actions/changed-files/tree/v13.1) (2022-01-09)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.0...v13.1)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -86,7 +94,7 @@
|
|||||||
|
|
||||||
## [v13](https://github.com/tj-actions/changed-files/tree/v13) (2022-01-05)
|
## [v13](https://github.com/tj-actions/changed-files/tree/v13) (2022-01-05)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v2.0.1...v13)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12.2...v13)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Implemented enhancements:**
|
||||||
|
|
||||||
@@ -104,13 +112,13 @@
|
|||||||
- Upgraded to v2.0.1 [\#298](https://github.com/tj-actions/changed-files/pull/298) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v2.0.1 [\#298](https://github.com/tj-actions/changed-files/pull/298) ([jackton1](https://github.com/jackton1))
|
||||||
- Upgraded to v12.2 [\#297](https://github.com/tj-actions/changed-files/pull/297) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v12.2 [\#297](https://github.com/tj-actions/changed-files/pull/297) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v2.0.1](https://github.com/tj-actions/changed-files/tree/v2.0.1) (2021-12-30)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12.2...v2.0.1)
|
|
||||||
|
|
||||||
## [v12.2](https://github.com/tj-actions/changed-files/tree/v12.2) (2021-12-30)
|
## [v12.2](https://github.com/tj-actions/changed-files/tree/v12.2) (2021-12-30)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12.1...v12.2)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v2.0.1...v12.2)
|
||||||
|
|
||||||
|
## [v2.0.1](https://github.com/tj-actions/changed-files/tree/v2.0.1) (2021-12-30)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12.1...v2.0.1)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -693,7 +701,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:**
|
||||||
|
|
||||||
@@ -709,13 +717,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:**
|
||||||
|
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -64,7 +64,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v4.0.1
|
uses: tj-actions/changed-files@v14.1
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
run: |
|
run: |
|
||||||
@@ -141,11 +141,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@v4.0.1
|
uses: tj-actions/changed-files@v14.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@v4.0.1
|
uses: tj-actions/changed-files@v14.1
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
|
||||||
@@ -167,7 +167,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@v4.0.1
|
uses: tj-actions/changed-files@v14.1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -206,14 +206,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@v4.0.1
|
uses: tj-actions/changed-files@v14.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@v4.0.1
|
uses: tj-actions/changed-files@v14.1
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -222,13 +222,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@v4.0.1
|
uses: tj-actions/changed-files@v14.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@v4.0.1
|
uses: tj-actions/changed-files@v14.1
|
||||||
with:
|
with:
|
||||||
base_sha: "2096ed0"
|
base_sha: "2096ed0"
|
||||||
|
|
||||||
@@ -240,7 +240,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@v4.0.1
|
uses: tj-actions/changed-files@v14.1
|
||||||
with:
|
with:
|
||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
@@ -252,7 +252,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@v4.0.1
|
uses: tj-actions/changed-files@v14.1
|
||||||
with:
|
with:
|
||||||
since_last_remote_commit: "true"
|
since_last_remote_commit: "true"
|
||||||
|
|
||||||
@@ -270,6 +270,14 @@ Support this project with a :star:
|
|||||||
> * However, this action will handle spaces in file names, with a recommendation of using a separator to prevent hidden issues.
|
> * However, this action will handle spaces in file names, with a recommendation of using a separator to prevent hidden issues.
|
||||||
> 
|
> 
|
||||||
|
|
||||||
|
## Compatibility
|
||||||
|
|
||||||
|
| Runner | Supported version |
|
||||||
|
|--------------------------|-----------------------|
|
||||||
|
| [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners) | `v14.1` |
|
||||||
|
| [GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@3.3/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server) | `v14.1` |
|
||||||
|
| [self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) | `v12.2` & `v2.0.1` |
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter).
|
This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter).
|
||||||
|
|||||||
14
action.yml
14
action.yml
@@ -112,21 +112,13 @@ runs:
|
|||||||
fi
|
fi
|
||||||
id: base-sha
|
id: base-sha
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: |
|
|
||||||
bash $GITHUB_ACTION_PATH/sourcefiles.sh
|
|
||||||
id: source-input-files
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
|
||||||
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
|
||||||
INPUT_FILES: ${{ inputs.files }}
|
|
||||||
INPUT_FILES_FROM_SOURCE_FILE: ${{ inputs.files_from_source_file }}
|
|
||||||
- name: Glob match
|
- name: Glob match
|
||||||
uses: tj-actions/glob@v3.3
|
uses: tj-actions/glob@v5
|
||||||
id: glob
|
id: glob
|
||||||
with:
|
with:
|
||||||
files: ${{ steps.source-input-files.outputs.files }}
|
files: ${{ inputs.files }}
|
||||||
files-separator: " "
|
files-separator: " "
|
||||||
|
files-from-source-file: ${{ inputs.files_from_source_file }}
|
||||||
separator: "|"
|
separator: "|"
|
||||||
- run: |
|
- run: |
|
||||||
bash $GITHUB_ACTION_PATH/entrypoint.sh
|
bash $GITHUB_ACTION_PATH/entrypoint.sh
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "::group::changed-files-from-source-file"
|
|
||||||
|
|
||||||
RAW_FILES=()
|
|
||||||
|
|
||||||
if [[ -n $INPUT_FILES_FROM_SOURCE_FILE ]]; then
|
|
||||||
for file in $INPUT_FILES_FROM_SOURCE_FILE
|
|
||||||
do
|
|
||||||
while read -r fileName; do
|
|
||||||
RAW_FILES+=("$fileName")
|
|
||||||
done <"$file"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
IFS=" " read -r -a CLEAN_FILES <<< "$(echo "${RAW_FILES[*]}" | tr "\r\n" "\n" | tr " " "\n" | awk -v d=" " '{s=(NR==1?s:s d)$0}END{print s}')"
|
|
||||||
|
|
||||||
IFS=" " read -r -a CLEAN_INPUT_FILES <<< "$(echo "${INPUT_FILES}" | tr "\r\n" "\n" | tr " " "\n" | awk -v d=" " '{s=(NR==1?s:s d)$0}END{print s}')"
|
|
||||||
|
|
||||||
FILES=("${CLEAN_FILES[@]}" "${CLEAN_INPUT_FILES[@]}")
|
|
||||||
|
|
||||||
IFS=" " read -r -a ALL_UNIQUE_FILES <<< "$(echo "${FILES[@]}" | tr "\r\n" "\n" | tr " " "\n" | awk '!a[$0]++' | awk -v d=" " '{s=(NR==1?s:s d)$0}END{print s}')"
|
|
||||||
|
|
||||||
echo "Input files: ${ALL_UNIQUE_FILES[*]}"
|
|
||||||
|
|
||||||
echo "::set-output name=files::${ALL_UNIQUE_FILES[*]}"
|
|
||||||
|
|
||||||
echo "::endgroup::"
|
|
||||||
Reference in New Issue
Block a user