Compare commits

..

13 Commits
v8.1 ... v8.3

Author SHA1 Message Date
Tonye Jack
d679de9200 Fixed empty branch name in debug message (#115) 2021-06-25 14:58:59 -04:00
Tonye Jack
e5890a16d1 Update README.md 2021-06-25 07:24:10 -04:00
Tonye Jack
76699419e3 Upgraded to v8.2 (#114)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-06-24 16:49:55 -04:00
Tonye Jack
1e10ed4950 Update arrow direction and added branch information (#113) 2021-06-24 16:46:31 -04:00
Tonye Jack
d8a3837b58 Delete codacy-analysis.yml 2021-06-24 12:55:41 -04:00
Tonye Jack
812f1ba385 Create codacy-analysis.yml 2021-06-24 12:38:48 -04:00
Tonye Jack
b8ad14b306 Updated README.md (#112)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-06-23 09:34:52 -04:00
Tonye Jack
b18824c9f0 Update README.md 2021-06-22 22:54:31 -04:00
Renovate Bot
1da043e160 Update tj-actions/verify-changed-files action to v7 2021-06-22 22:11:54 -04:00
Tonye Jack
f9f0a46798 Update action.yml 2021-06-21 18:36:10 -04:00
Tonye Jack
51a1c2074d Update README.md 2021-06-21 18:35:17 -04:00
Tonye Jack
3772657346 Update README.md 2021-06-21 18:34:15 -04:00
Tonye Jack
67831ca117 Upgraded to v8.1 (#110)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-06-18 19:33:45 -04:00
5 changed files with 48 additions and 21 deletions

View File

@@ -17,7 +17,7 @@ jobs:
uses: tj-actions/remark@v1.5
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v6
uses: tj-actions/verify-changed-files@v7
id: verify_changed_files
with:
files: |

View File

@@ -1,12 +1,31 @@
# Changelog
## [Unreleased](https://github.com/tj-actions/changed-files/tree/HEAD)
## [v8.2](https://github.com/tj-actions/changed-files/tree/v8.2) (2021-06-24)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v8...HEAD)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v8.1...v8.2)
**Closed issues:**
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
**Merged pull requests:**
- Updated README.md [\#103](https://github.com/tj-actions/changed-files/pull/103) ([jackton1](https://github.com/jackton1))
- Update arrow direction and added branch information [\#113](https://github.com/tj-actions/changed-files/pull/113) ([jackton1](https://github.com/jackton1))
- Updated README.md [\#112](https://github.com/tj-actions/changed-files/pull/112) ([jackton1](https://github.com/jackton1))
- Update tj-actions/verify-changed-files action to v7 [\#111](https://github.com/tj-actions/changed-files/pull/111) ([renovate[bot]](https://github.com/apps/renovate))
- Upgraded to v8.1 [\#110](https://github.com/tj-actions/changed-files/pull/110) ([jackton1](https://github.com/jackton1))
## [v8.1](https://github.com/tj-actions/changed-files/tree/v8.1) (2021-06-18)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v8...v8.1)
**Closed issues:**
- Rename changed\_files -\> type\_changed\_files [\#105](https://github.com/tj-actions/changed-files/issues/105)
**Merged pull requests:**
- Rename changed\_files to type\_changed\_files [\#109](https://github.com/tj-actions/changed-files/pull/109) ([jackton1](https://github.com/jackton1))
## [v8](https://github.com/tj-actions/changed-files/tree/v8) (2021-06-18)
@@ -16,10 +35,14 @@
- support windows-latest [\#101](https://github.com/tj-actions/changed-files/issues/101)
- issues with failed getting changed files [\#100](https://github.com/tj-actions/changed-files/issues/100)
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
**Merged pull requests:**
- Fixed missing env variables [\#108](https://github.com/tj-actions/changed-files/pull/108) ([jackton1](https://github.com/jackton1))
- Add macos to test. [\#107](https://github.com/tj-actions/changed-files/pull/107) ([jackton1](https://github.com/jackton1))
- Updated README.md [\#106](https://github.com/tj-actions/changed-files/pull/106) ([jackton1](https://github.com/jackton1))
- Upgraded to v8 [\#104](https://github.com/tj-actions/changed-files/pull/104) ([jackton1](https://github.com/jackton1))
- Updated README.md [\#103](https://github.com/tj-actions/changed-files/pull/103) ([jackton1](https://github.com/jackton1))
- Add support for multiple platforms [\#102](https://github.com/tj-actions/changed-files/pull/102) ([jackton1](https://github.com/jackton1))
- Update alpine Docker tag to v3.14.0 [\#99](https://github.com/tj-actions/changed-files/pull/99) ([renovate[bot]](https://github.com/apps/renovate))
- Updated README.md [\#98](https://github.com/tj-actions/changed-files/pull/98) ([jackton1](https://github.com/jackton1))
@@ -29,7 +52,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:**
@@ -45,13 +68,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

@@ -8,10 +8,11 @@
## changed-files
Retrieve all changed files relative to the default branch (`pull_request*` events) or a previous commit (`push` event) returning the **absolute path** to all changed files from the project root.
Retrieve all changed files relative to the default branch (`pull_request*` based events) or a previous commit (`push` based event) returning the **absolute path** to all changed files from the project root.
## Features
* Boolean output indicating that certain files have been modified.
* List all files that have changed.
* Between the current pull request branch and the default branch.
* Between the last commit and the current pushed change.
@@ -29,7 +30,7 @@ Retrieve all changed files relative to the default branch (`pull_request*` event
> NOTE: :warning:
>
> * **IMPORTANT:** For `push` events to work you need to include `fetch-depth: 0` **OR** `fetch-depth: 2` depending on your use case.
> * **IMPORTANT:** For `push` events you need to include `fetch-depth: 0` **OR** `fetch-depth: 2` depending on your use case.
> * When using `persist-credentials: false` with `actions/checkout@v2` you'll need to specify a `token` using the `token` input.
```yaml
@@ -54,7 +55,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v8
uses: tj-actions/changed-files@v8.2
- name: List all modified files
run: |
@@ -96,7 +97,7 @@ jobs:
|:-------------:|:-----------:|:-------------:|:-----------------------------:|:-------------:|
| token | `string` | `false` | `${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow) <br /> or a repo scoped <br /> [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) |
| separator | `string` | `true` | `' '` | Output string separator |
| files | `string` OR `string[]` | `false` | | Restricted list <br> or string of specific <br> files or filename <br> to watch for changes |
| files | `string` OR `string[]` | `false` | | Check for changes <br> using only this list of files <br> (Defaults to the entire repo) |
## Example
@@ -107,11 +108,11 @@ jobs:
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v8
uses: tj-actions/changed-files@v8.2
- name: Get changed files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v8
uses: tj-actions/changed-files@v8.2
with:
separator: ","
@@ -133,7 +134,7 @@ jobs:
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v8
uses: tj-actions/changed-files@v8.2
with:
files: |
my-file.txt
@@ -162,7 +163,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v8
uses: tj-actions/changed-files@v8.2
- name: Pre-commit
uses: pre-commit/action@v2.0.0

View File

@@ -11,7 +11,7 @@ inputs:
required: true
default: " "
files:
description: 'Check for file changes for all files listed (Defaults to the entire repo)'
description: 'Check for changes using only this list of files (Defaults to the entire repo)'
required: false
default: ""

View File

@@ -19,6 +19,8 @@ fi
if [[ -z $GITHUB_BASE_REF ]]; then
PREV_SHA=$(git rev-parse HEAD^1 2>&1) && exit_status=$? || exit_status=$?
TARGET_BRANCH=${GITHUB_REF/refs\/heads\//}
CURRENT_BRANCH=$TARGET_BRANCH
if [[ $exit_status -ne 0 ]]; then
echo "::warning::Unable to determine the previous commit sha"
@@ -27,6 +29,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
fi
else
TARGET_BRANCH=${GITHUB_BASE_REF}
CURRENT_BRANCH=$GITHUB_HEAD_REF
git fetch --depth=1 origin "${TARGET_BRANCH}":"${TARGET_BRANCH}"
PREV_SHA=$(git rev-parse "${TARGET_BRANCH}" 2>&1) && exit_status=$? || exit_status=$?
@@ -36,7 +39,7 @@ else
fi
fi
echo "Retrieving changes between $PREV_SHA $CURR_SHA"
echo "Retrieving changes between $PREV_SHA ($TARGET_BRANCH) ← $CURR_SHA ($CURRENT_BRANCH)"
if [[ -z "$INPUT_FILES" ]]; then
echo "Getting diff..."