Compare commits

...

8 Commits

Author SHA1 Message Date
Tonye Jack
271468ecaf Updated separator 2022-02-16 22:54:27 -05:00
Tonye Jack
5b338faafa bug: resolve issue with excluding files via glob pattern (#337)
* bug: resolve issue with excluding files via glob pattern

* Update action.yml

* Update action.yml
2022-02-01 03:34:33 -05:00
Tonye Jack
b73d4f8d3f Update sourcefiles.sh 2022-01-31 15:07:53 -05:00
dependabot[bot]
9d48b7acf4 Bump peter-evans/create-pull-request from 3.12.0 to 3.12.1
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3.12.0...v3.12.1)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-30 20:32:02 -05:00
Tonye Jack
2458fea93e Update README.md 2022-01-30 04:39:43 -05:00
Tonye Jack
539c9b2f0c Update README.md 2022-01-28 17:16:19 -05:00
Tonye Jack
1bf2f9775d Update README.md 2022-01-28 12:33:53 -05:00
Tonye Jack
6be19fd726 Upgraded from v4.0.1 -> v14.1 (#332)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2022-01-26 02:40:00 -05:00
6 changed files with 49 additions and 71 deletions

View File

@@ -23,7 +23,7 @@ jobs:
with:
output: 'HISTORY.md'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3.12.0
uses: peter-evans/create-pull-request@v3.12.1
with:
base: "main"
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"

View File

@@ -31,7 +31,7 @@ jobs:
- name: Create Pull Request
if: failure()
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v3.12.1
with:
base: "main"
title: "Updated README.md"

View File

@@ -1,5 +1,13 @@
# 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)
[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)
[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:**
@@ -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 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)
[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:**
@@ -86,7 +94,7 @@
## [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:**
@@ -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 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)
[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:**
@@ -693,7 +701,7 @@
## [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:**
@@ -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))
- 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)
[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:**

View File

@@ -64,7 +64,7 @@ jobs:
- name: Get 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
run: |
@@ -141,11 +141,11 @@ Support this project with a :star:
- name: Get changed files using defaults
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
id: changed-files-comma
uses: tj-actions/changed-files@v4.0.1
uses: tj-actions/changed-files@v14.1
with:
separator: ","
@@ -167,7 +167,7 @@ Support this project with a :star:
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v4.0.1
uses: tj-actions/changed-files@v14.1
with:
files: |
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.
id: changed-files-specific-source-file
uses: tj-actions/changed-files@v4.0.1
uses: tj-actions/changed-files@v14.1
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@v4.0.1
uses: tj-actions/changed-files@v14.1
with:
files_from_source_file: |
test/changed-files-list.txt
@@ -222,13 +222,13 @@ Support this project with a :star:
- name: Use a different commit SHA
id: changed-files-custom-sha
uses: tj-actions/changed-files@v4.0.1
uses: tj-actions/changed-files@v14.1
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@v4.0.1
uses: tj-actions/changed-files@v14.1
with:
base_sha: "2096ed0"
@@ -240,7 +240,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@v4.0.1
uses: tj-actions/changed-files@v14.1
with:
path: dir1
@@ -252,7 +252,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@v4.0.1
uses: tj-actions/changed-files@v14.1
with:
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.
> ![Screen Shot 2021-10-23 at 9 37 34 AM](https://user-images.githubusercontent.com/17484350/138558767-b13c90bf-a1ae-4e86-9520-70a6a4624f41.png)
## 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
This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter).

View File

@@ -112,21 +112,13 @@ runs:
fi
id: base-sha
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
uses: tj-actions/glob@v3.3
uses: tj-actions/glob@v5
id: glob
with:
files: ${{ steps.source-input-files.outputs.files }}
files: ${{ inputs.files }}
files-separator: " "
files-from-source-file: ${{ inputs.files_from_source_file }}
separator: "|"
- run: |
bash $GITHUB_ACTION_PATH/entrypoint.sh

View File

@@ -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::"