Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d1287f9fa | ||
|
|
613e474ee0 | ||
|
|
8125192be8 | ||
|
|
d5d55864de | ||
|
|
508ea1fe11 | ||
|
|
dbfd5e10a7 | ||
|
|
4ca6f666de | ||
|
|
20abff4daa | ||
|
|
011c918754 | ||
|
|
71a44a5c8c | ||
|
|
42b8312161 | ||
|
|
99639db2ad |
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@@ -12,9 +12,9 @@ on:
|
|||||||
- reopened
|
- reopened
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
# pull_request_review
|
pull_request_review:
|
||||||
# branches:
|
branches:
|
||||||
# - main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
shellcheck:
|
shellcheck:
|
||||||
|
|||||||
2
.github/workflows/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Run auto-doc
|
- name: Run auto-doc
|
||||||
uses: tj-actions/auto-doc@v1.6.0
|
uses: tj-actions/auto-doc@v1.7.2
|
||||||
|
|
||||||
- name: Run test
|
- name: Run test
|
||||||
uses: tj-actions/remark@v3
|
uses: tj-actions/remark@v3
|
||||||
|
|||||||
44
HISTORY.md
44
HISTORY.md
@@ -1,17 +1,29 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [v35.1.2](https://github.com/tj-actions/changed-files/tree/v35.1.2) (2022-12-29)
|
## [v35.2.0](https://github.com/tj-actions/changed-files/tree/v35.2.0) (2022-12-30)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v35...v35.1.2)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v35...v35.2.0)
|
||||||
|
|
||||||
## [v35](https://github.com/tj-actions/changed-files/tree/v35) (2022-12-29)
|
## [v35](https://github.com/tj-actions/changed-files/tree/v35) (2022-12-30)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v35.1.1...v35)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v35.1.2...v35)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
- \[BUG\] `files_ignore` used with `files` not ignoring as expected [\#901](https://github.com/tj-actions/changed-files/issues/901)
|
- \[BUG\] `files_ignore` used with `files` not ignoring as expected [\#901](https://github.com/tj-actions/changed-files/issues/901)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- chore: update the test [\#909](https://github.com/tj-actions/changed-files/pull/909) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Updated README.md [\#908](https://github.com/tj-actions/changed-files/pull/908) ([jackton1](https://github.com/jackton1))
|
||||||
|
- docs: add adonisgarciac as a contributor for code, and doc [\#907](https://github.com/tj-actions/changed-files/pull/907) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- Upgraded to v35.1.2 [\#905](https://github.com/tj-actions/changed-files/pull/905) ([jackton1](https://github.com/jackton1))
|
||||||
|
- add raw-output option for json output [\#900](https://github.com/tj-actions/changed-files/pull/900) ([adonisgarciac](https://github.com/adonisgarciac))
|
||||||
|
|
||||||
|
## [v35.1.2](https://github.com/tj-actions/changed-files/tree/v35.1.2) (2022-12-29)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v35.1.1...v35.1.2)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
||||||
@@ -515,7 +527,7 @@
|
|||||||
|
|
||||||
## [v34.0.0](https://github.com/tj-actions/changed-files/tree/v34.0.0) (2022-10-25)
|
## [v34.0.0](https://github.com/tj-actions/changed-files/tree/v34.0.0) (2022-10-25)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v34.0.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33...v34.0.0)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
@@ -528,13 +540,13 @@
|
|||||||
- feat: add support for fetching more history [\#709](https://github.com/tj-actions/changed-files/pull/709) ([jackton1](https://github.com/jackton1))
|
- feat: add support for fetching more history [\#709](https://github.com/tj-actions/changed-files/pull/709) ([jackton1](https://github.com/jackton1))
|
||||||
- Upgraded to v33.0.0 [\#707](https://github.com/tj-actions/changed-files/pull/707) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v33.0.0 [\#707](https://github.com/tj-actions/changed-files/pull/707) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v33.0.0](https://github.com/tj-actions/changed-files/tree/v33.0.0) (2022-10-21)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33...v33.0.0)
|
|
||||||
|
|
||||||
## [v33](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21)
|
## [v33](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v33)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v33)
|
||||||
|
|
||||||
|
## [v33.0.0](https://github.com/tj-actions/changed-files/tree/v33.0.0) (2022-10-21)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v33.0.0)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -615,7 +627,7 @@
|
|||||||
|
|
||||||
## [v32.0.0](https://github.com/tj-actions/changed-files/tree/v32.0.0) (2022-10-06)
|
## [v32.0.0](https://github.com/tj-actions/changed-files/tree/v32.0.0) (2022-10-06)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.3...v32.0.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v32.0.0)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -626,13 +638,13 @@
|
|||||||
- chore\(deps\): update actions/checkout action to v3.1.0 [\#669](https://github.com/tj-actions/changed-files/pull/669) ([renovate[bot]](https://github.com/apps/renovate))
|
- chore\(deps\): update actions/checkout action to v3.1.0 [\#669](https://github.com/tj-actions/changed-files/pull/669) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v31.0.3 [\#667](https://github.com/tj-actions/changed-files/pull/667) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v31.0.3 [\#667](https://github.com/tj-actions/changed-files/pull/667) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v31.0.3](https://github.com/tj-actions/changed-files/tree/v31.0.3) (2022-10-02)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v31.0.3)
|
|
||||||
|
|
||||||
## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-10-02)
|
## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-10-02)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.2...v31)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.3...v31)
|
||||||
|
|
||||||
|
## [v31.0.3](https://github.com/tj-actions/changed-files/tree/v31.0.3) (2022-10-02)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.2...v31.0.3)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
|||||||
94
README.md
94
README.md
@@ -19,7 +19,7 @@ Retrieve all changed files and directories relative to the target branch or the
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Fast execution (0-2 seconds on average).
|
* Fast execution (0-10 seconds on average).
|
||||||
* Easy to debug.
|
* Easy to debug.
|
||||||
* Scales to large repositories.
|
* Scales to large repositories.
|
||||||
* Git submodules support.
|
* Git submodules support.
|
||||||
@@ -128,28 +128,28 @@ Support this project with a :star:
|
|||||||
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
|
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
| OUTPUT | TYPE | DESCRIPTION |
|
| OUTPUT | TYPE | DESCRIPTION |
|
||||||
|--------------------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|--------------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| added\_files | string | Returns only files that are Added (A).<br> |
|
| added\_files | string | Returns only files that are Added<br>(A). |
|
||||||
| all\_changed\_and\_modified\_files | string | Returns all changed and modified files i.e.<br>*a combination of (ACMRDTUX)* |
|
| all\_changed\_and\_modified\_files | string | Returns all changed and modified files<br>i.e. *a combination of (ACMRDTUX)* |
|
||||||
| all\_changed\_files | string | Returns all changed files i.e. *a combination<br>of all added, copied, modified and renamed<br>files (ACMR)* |
|
| all\_changed\_files | string | Returns all changed files i.e. *a<br> combination of all added, copied, modified<br>and renamed files (ACMR)* |
|
||||||
| all\_modified\_files | string | Returns all changed files i.e. *a combination<br>of all added, copied, modified, renamed and<br>deleted files (ACMRD)*. |
|
| all\_modified\_files | string | Returns all changed files i.e. *a<br> combination of all added, copied, modified,<br>renamed and deleted files (ACMRD)*. |
|
||||||
| all\_old\_new\_renamed\_files | string | Returns only files that are Renamed and<br>list their old and new names. **NOTE:**<br>This requires setting `include_all_old_new_renamed_files` to `true` (R)<br> |
|
| all\_old\_new\_renamed\_files | string | Returns only files that are Renamed<br> and list their old and new<br> names. **NOTE:** This requires setting `include_all_old_new_renamed_files`<br>to `true` (R) |
|
||||||
| any\_changed | string | Returns `true` when any of the filenames<br>provided using the `files` input has changed.<br>If no `files` have been specified,an empty<br>string `''` is returned. i.e. *using a<br>combination of all added, copied, modified and<br>renamed files (ACMR)*. |
|
| any\_changed | string | Returns `true` when any of the<br> filenames provided using the `files` input<br> has changed. If no `files` have<br> been specified,an empty string `''` is<br> returned. i.e. *using a combination of<br> all added, copied, modified and renamed<br>files (ACMR)*. |
|
||||||
| any\_deleted | string | Returns `true` when any of the filenames<br>provided using the `files` input has been<br>deleted. If no `files` have been specified,an<br>empty string `''` is returned. (D) |
|
| any\_deleted | string | Returns `true` when any of the<br> filenames provided using the `files` input<br> has been deleted. If no `files`<br> have been specified,an empty string `''`<br>is returned. (D) |
|
||||||
| any\_modified | string | Returns `true` when any of the filenames<br>provided using the `files` input has been<br>modified. If no `files` have been specified,an<br>empty string `''` is returned. i.e. *using<br>a combination of all added, copied, modified,<br>renamed, and deleted files (ACMRD)*. |
|
| any\_modified | string | Returns `true` when any of the<br> filenames provided using the `files` input<br> has been modified. If no `files`<br> have been specified,an empty string `''`<br> is returned. i.e. *using a combination<br> of all added, copied, modified, renamed,<br>and deleted files (ACMRD)*. |
|
||||||
| copied\_files | string | Returns only files that are Copied (C).<br> |
|
| copied\_files | string | Returns only files that are Copied<br>(C). |
|
||||||
| deleted\_files | string | Returns only files that are Deleted (D).<br> |
|
| deleted\_files | string | Returns only files that are Deleted<br>(D). |
|
||||||
| modified\_files | string | Returns only files that are Modified (M).<br> |
|
| modified\_files | string | Returns only files that are Modified<br>(M). |
|
||||||
| only\_changed | string | Returns `true` when only files provided using<br>the `files` input has changed. If no<br>`files` have been specified,an empty string `''`<br>is returned. i.e. *using a combination of<br>all added, copied, modified and renamed files<br>(ACMR)*. |
|
| only\_changed | string | Returns `true` when only files provided<br> using the `files` input has changed.<br> If no `files` have been specified,an<br> empty string `''` is returned. i.e.<br> *using a combination of all added,<br>copied, modified and renamed files (ACMR)*. |
|
||||||
| only\_deleted | string | Returns `true` when only files provided using<br>the `files` input has been deleted. If<br>no `files` have been specified,an empty string<br>`''` is returned. (D) |
|
| only\_deleted | string | Returns `true` when only files provided<br> using the `files` input has been<br> deleted. If no `files` have been<br> specified,an empty string `''` is returned.<br>(D) |
|
||||||
| only\_modified | string | Returns `true` when only files provided using<br>the `files` input has been modified. If<br>no `files` have been specified,an empty string<br>`''` is returned.(ACMRD). |
|
| only\_modified | string | Returns `true` when only files provided<br> using the `files` input has been<br> modified. If no `files` have been<br>specified,an empty string `''` is returned.(ACMRD). |
|
||||||
| other\_changed\_files | string | Returns all other changed files not listed<br>in the files input i.e. *using a<br>combination of all added, copied, modified and<br>renamed files (ACMR)*. |
|
| other\_changed\_files | string | Returns all other changed files not<br> listed in the files input i.e.<br> *using a combination of all added,<br>copied, modified and renamed files (ACMR)*. |
|
||||||
| other\_deleted\_files | string | Returns all other deleted files not listed<br>in the files input i.e. *a combination<br>of all deleted files (D)* |
|
| other\_deleted\_files | string | Returns all other deleted files not<br> listed in the files input i.e.<br> *a combination of all deleted files<br>(D)* |
|
||||||
| other\_modified\_files | string | Returns all other modified files not listed<br>in the files input i.e. *a combination<br>of all added, copied, modified, and deleted<br>files (ACMRD)* |
|
| other\_modified\_files | string | Returns all other modified files not<br> listed in the files input i.e.<br> *a combination of all added, copied,<br>modified, and deleted files (ACMRD)* |
|
||||||
| renamed\_files | string | Returns only files that are Renamed (R).<br> |
|
| renamed\_files | string | Returns only files that are Renamed<br>(R). |
|
||||||
| type\_changed\_files | string | Returns only files that have their file<br>type changed (T). |
|
| type\_changed\_files | string | Returns only files that have their<br>file type changed (T). |
|
||||||
| unknown\_files | string | Returns only files that are Unknown (X).<br> |
|
| unknown\_files | string | Returns only files that are Unknown<br>(X). |
|
||||||
| unmerged\_files | string | Returns only files that are Unmerged (U).<br> |
|
| unmerged\_files | string | Returns only files that are Unmerged<br>(U). |
|
||||||
|
|
||||||
<!-- AUTO-DOC-OUTPUT:END -->
|
<!-- AUTO-DOC-OUTPUT:END -->
|
||||||
|
|
||||||
@@ -158,33 +158,33 @@ Support this project with a :star:
|
|||||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
||||||
|-----------------------------------|--------|----------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-----------------------------------|--------|----------|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| base\_sha | string | false | | Specify a different base commit SHA used<br>for comparing changes |
|
| base\_sha | string | false | | Specify a different base commit SHA<br>used for comparing changes |
|
||||||
| diff\_relative | string | false | | Exclude changes outside the current directory and<br>show path names relative to it. **NOTE:**<br>This requires you to specify the top<br>level directory via the `path` input. |
|
| diff\_relative | string | false | | Exclude changes outside the current directory<br> and show path names relative to<br> it. **NOTE:** This requires you to<br> specify the top level directory via<br>the `path` input. |
|
||||||
| dir\_names | string | false | `"false"` | Output unique changed directories instead of filenames.<br>**NOTE:** This returns `.` for changed files<br>located in the root of the project.<br> |
|
| dir\_names | string | false | `"false"` | Output unique changed directories instead of<br> filenames. **NOTE:** This returns `.` for<br> changed files located in the root<br>of the project. |
|
||||||
| dir\_names\_max\_depth | string | false | | Maximum depth of directories to output. e.g<br>`test/test1/test2` with max depth of `2` returns<br>`test/test1`. |
|
| dir\_names\_max\_depth | string | false | | Maximum depth of directories to output.<br> e.g `test/test1/test2` with max depth of<br>`2` returns `test/test1`. |
|
||||||
| fetch\_depth | string | false | `"50"` | Depth of additional branch history fetched. **NOTE**:<br>This can be adjusted to resolve errors<br>with insufficient history. |
|
| fetch\_depth | string | false | `"50"` | Depth of additional branch history fetched.<br> **NOTE**: This can be adjusted to<br>resolve errors with insufficient history. |
|
||||||
| files | string | false | | File and directory patterns to detect changes<br>using only these list of file(s) (Defaults<br>to the entire repo) **NOTE:** Multiline file/directory<br>patterns should not include quotes. |
|
| files | string | false | | File and directory patterns to detect<br> changes using only these list of<br> file(s) (Defaults to the entire repo)<br> **NOTE:** Multiline file/directory patterns should not<br>include quotes. |
|
||||||
| files\_from\_source\_file | string | false | | Source file(s) used to populate the `files`<br>input. |
|
| files\_from\_source\_file | string | false | | Source file(s) used to populate the<br>`files` input. |
|
||||||
| files\_ignore | string | false | | Ignore changes to these file(s) **NOTE:** Multiline<br>file/directory patterns should not include quotes. |
|
| files\_ignore | string | false | | Ignore changes to these file(s) **NOTE:**<br> Multiline file/directory patterns should not include<br>quotes. |
|
||||||
| files\_ignore\_from\_source\_file | string | false | | Source file(s) used to populate the `files_ignore`<br>input |
|
| files\_ignore\_from\_source\_file | string | false | | Source file(s) used to populate the<br>`files_ignore` input |
|
||||||
| files\_ignore\_separator | string | false | `"\n"` | Separator used to split the `files_ignore` input<br> |
|
| files\_ignore\_separator | string | false | `"\n"` | Separator used to split the `files_ignore`<br>input |
|
||||||
| files\_separator | string | false | `"\n"` | Separator used to split the `files` input<br> |
|
| files\_separator | string | false | `"\n"` | Separator used to split the `files`<br>input |
|
||||||
| include\_all\_old\_new\_renamed\_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this can generate<br>a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
| include\_all\_old\_new\_renamed\_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this can<br>generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
||||||
| json | string | false | `"false"` | Output list of changed files in a<br>JSON formatted string which can be used<br>for matrix jobs. |
|
| json | string | false | `"false"` | Output list of changed files in<br> a JSON formatted string which can<br>be used for matrix jobs. |
|
||||||
| json\_raw\_format | string | false | `"false"` | Output list of changed files in a<br>raw format which means that the output<br>will not be surrounded by quotes and<br>special characters will not be escaped. |
|
| json\_raw\_format | string | false | `"false"` | Output list of changed files in<br> a raw format which means that<br> the output will not be surrounded<br> by quotes and special characters will<br>not be escaped. |
|
||||||
| match\_directories | string | false | `"true"` | Indicates whether to include match directories |
|
| match\_directories | string | false | `"true"` | Indicates whether to include match directories |
|
||||||
| old\_new\_files\_separator | string | false | `" "` | Split character for old and new renamed<br>filename pairs. |
|
| old\_new\_files\_separator | string | false | `" "` | Split character for old and new<br>renamed filename pairs. |
|
||||||
| old\_new\_separator | string | false | `","` | Split character for old and new filename<br>pairs. |
|
| old\_new\_separator | string | false | `","` | Split character for old and new<br>filename pairs. |
|
||||||
| output\_dir | string | false | `".github/outputs"` | Directory to store output files. |
|
| output\_dir | string | false | `".github/outputs"` | Directory to store output files. |
|
||||||
| path | string | false | `"."` | Specify a relative path under `$GITHUB_WORKSPACE` to<br>locate the repository. |
|
| path | string | false | `"."` | Specify a relative path under `$GITHUB_WORKSPACE`<br>to locate the repository. |
|
||||||
| quotepath | string | false | `"true"` | Use non ascii characters to match files<br>and output the filenames completely verbatim by<br>setting this to `false` |
|
| quotepath | string | false | `"true"` | Use non ascii characters to match<br> files and output the filenames completely<br>verbatim by setting this to `false` |
|
||||||
| separator | string | false | `" "` | Split character for output strings |
|
| separator | string | false | `" "` | Split character for output strings |
|
||||||
| sha | string | false | | Specify a different commit SHA used for<br>comparing changes |
|
| sha | string | false | | Specify a different commit SHA used<br>for comparing changes |
|
||||||
| since | string | false | | Get changed files for commits whose timestamp<br>is older than the given time. |
|
| since | string | false | | Get changed files for commits whose<br> timestamp is older than the given<br>time. |
|
||||||
| since\_last\_remote\_commit | string | true | `"false"` | Use the last commit on the remote<br>branch as the `base_sha`. Defaults to the<br>last non merge commit on the target<br>branch for pull request events and the<br>previous remote commit of the current branch<br>for push events. |
|
| since\_last\_remote\_commit | string | true | `"false"` | Use the last commit on the<br> remote branch as the `base_sha`. Defaults<br> to the last non merge commit<br> on the target branch for pull<br> request events and the previous remote<br> commit of the current branch for<br>push events. |
|
||||||
| until | string | false | | Get changed files for commits whose timestamp<br>is earlier than the given time. |
|
| until | string | false | | Get changed files for commits whose<br> timestamp is earlier than the given<br>time. |
|
||||||
| write\_output\_files | string | false | `"false"` | Write outputs to files in the `.github/outputs`<br>folder by default. |
|
| write\_output\_files | string | false | `"false"` | Write outputs to files in the<br>`.github/outputs` folder by default. |
|
||||||
|
|
||||||
<!-- AUTO-DOC-INPUT:END -->
|
<!-- AUTO-DOC-INPUT:END -->
|
||||||
|
|
||||||
|
|||||||
10
action.yml
10
action.yml
@@ -182,11 +182,11 @@ runs:
|
|||||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||||
GITHUB_REF: ${{ github.ref }}
|
GITHUB_REF: ${{ github.ref }}
|
||||||
GITHUB_SHA: ${{ github.sha }}
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
GITHUB_BASE_REF: ${{ github.base_ref }}
|
|
||||||
GITHUB_HEAD_REF: ${{ github.head_ref }}
|
|
||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
|
|
||||||
GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ github.event.pull_request.base.ref }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
||||||
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||||
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
GITHUB_EVENT_PULL_REQUEST_COMMITS: ${{ github.event.pull_request.commits }}
|
GITHUB_EVENT_PULL_REQUEST_COMMITS: ${{ github.event.pull_request.commits }}
|
||||||
@@ -226,8 +226,8 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
GITHUB_BASE_REF: ${{ github.base_ref }}
|
GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ github.event.pull_request.base.ref }}
|
||||||
GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
||||||
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
||||||
INPUT_FILES_PATTERN_FILE: ${{ steps.glob.outputs.paths-output-file }}
|
INPUT_FILES_PATTERN_FILE: ${{ steps.glob.outputs.paths-output-file }}
|
||||||
|
|||||||
14
diff-sha.sh
14
diff-sha.sh
@@ -13,7 +13,7 @@ if [[ "$GITHUB_REF" == "refs/tags/"* ]]; then
|
|||||||
EXTRA_ARGS="--prune --no-recurse-submodules"
|
EXTRA_ARGS="--prune --no-recurse-submodules"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $GITHUB_BASE_REF || "$GITHUB_EVENT_HEAD_REPO_FORK" == "true" ]]; then
|
if [[ -z $GITHUB_EVENT_PULL_REQUEST_BASE_REF || "$GITHUB_EVENT_HEAD_REPO_FORK" == "true" ]]; then
|
||||||
DIFF=".."
|
DIFF=".."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ else
|
|||||||
echo "Valid git version found: ($GIT_VERSION)"
|
echo "Valid git version found: ($GIT_VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $GITHUB_BASE_REF ]]; then
|
if [[ -z $GITHUB_EVENT_PULL_REQUEST_BASE_REF ]]; then
|
||||||
echo "Running on a push event..."
|
echo "Running on a push event..."
|
||||||
TARGET_BRANCH=$GITHUB_REFNAME
|
TARGET_BRANCH=$GITHUB_REFNAME
|
||||||
CURRENT_BRANCH=$TARGET_BRANCH
|
CURRENT_BRANCH=$TARGET_BRANCH
|
||||||
@@ -58,7 +58,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
echo "Fetching remote refs..."
|
echo "Fetching remote refs..."
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH" 1>/dev/null 2>&1
|
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH" 1>/dev/null
|
||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
echo "::debug::Getting HEAD SHA..."
|
||||||
if [[ -n "$INPUT_UNTIL" ]]; then
|
if [[ -n "$INPUT_UNTIL" ]]; then
|
||||||
@@ -150,8 +150,8 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Running on a pull request event..."
|
echo "Running on a pull request event..."
|
||||||
TARGET_BRANCH=$GITHUB_BASE_REF
|
TARGET_BRANCH=$GITHUB_EVENT_PULL_REQUEST_BASE_REF
|
||||||
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
CURRENT_BRANCH=$GITHUB_EVENT_PULL_REQUEST_HEAD_REF
|
||||||
|
|
||||||
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
|
||||||
TARGET_BRANCH=$CURRENT_BRANCH
|
TARGET_BRANCH=$CURRENT_BRANCH
|
||||||
@@ -159,7 +159,7 @@ else
|
|||||||
|
|
||||||
echo "Fetching remote refs..."
|
echo "Fetching remote refs..."
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
git fetch $EXTRA_ARGS -u --progress origin pull/"$GITHUB_EVENT_NUMBER"/head:"$CURRENT_BRANCH" 1>/dev/null 2>&1
|
git fetch $EXTRA_ARGS -u --progress origin pull/"$GITHUB_EVENT_PULL_REQUEST_NUMBER"/head:"$CURRENT_BRANCH" 1>/dev/null
|
||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
echo "::debug::Getting HEAD SHA..."
|
||||||
if [[ -n "$INPUT_UNTIL" ]]; then
|
if [[ -n "$INPUT_UNTIL" ]]; then
|
||||||
@@ -199,7 +199,7 @@ else
|
|||||||
else
|
else
|
||||||
echo "::debug::Fetching remote target branch..."
|
echo "::debug::Fetching remote target branch..."
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
git fetch -u --progress $EXTRA_ARGS --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" 1>/dev/null 2>&1
|
git fetch -u --progress $EXTRA_ARGS --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" 1>/dev/null
|
||||||
|
|
||||||
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 1>/dev/null 2>&1 || true
|
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 1>/dev/null 2>&1 || true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user