Skip to content

Commit b4a2f90

Browse files
authored
Merge pull request #3 from step-security/main
Update with recent changes from upstream fork
2 parents 89030a2 + 6fcdc3f commit b4a2f90

22 files changed

Lines changed: 802 additions & 70 deletions

.github/workflows/auto_cherry_pick.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ on:
1616
description: "Specify a script to run after audit fix"
1717
required: false
1818
default: "yarn run all"
19+
mode:
20+
description: "Run mode: cherry-pick or verify"
21+
required: false
22+
default: "cherry-pick"
23+
24+
pull_request:
25+
types: [labeled, opened, synchronize]
1926

2027
permissions:
2128
contents: write
@@ -24,11 +31,13 @@ permissions:
2431
issues: write
2532

2633
jobs:
27-
audit-fix:
28-
uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@upstream-Changes-CherryPick
34+
cherry-pick:
35+
if: github.event_name == 'workflow_dispatch' || contains(fromJson(toJson(github.event.pull_request.labels)).*.name, 'review-required')
36+
uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@v1
2937
with:
3038
original-owner: "tj-actions"
3139
repo-name: "changed-files"
3240
base_branch: ${{ inputs.base_branch }}
3341
package_manager: "yarn"
34-
script: ${{ inputs.script || 'yarn run all' }}
42+
script: ${{ inputs.script || 'yarn run all' }}
43+
mode: ${{ github.event_name == 'pull_request' && 'verify' || inputs.mode }}

.github/workflows/matrix-example.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,16 @@ jobs:
5353
- name: Test
5454
run: |
5555
echo ${{ matrix.files }}
56+
57+
conditional-job:
58+
name: Run Conditional Job
59+
runs-on: ubuntu-latest
60+
needs: [changed-files]
61+
if: contains(needs.changed-files.outputs.matrix, 'README.md') # Conditional check for README
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
65+
- name: Execute Conditional Logic
66+
run: |
67+
echo "README.md has been changed. Running conditional job."
68+

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ jobs:
4949
fetch-depth: 0
5050
repository: ${{ github.event.pull_request.head.repo.full_name }}
5151

52-
- name: Use Node.js 20.x
52+
- name: Use Node.js 24.x
5353
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
5454
with:
5555
cache: 'yarn'
56-
node-version: '20.x'
56+
node-version: '24.x'
5757

5858
- name: Create coverage directory and clover.xml
5959
run: |

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
24

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Effortlessly track all changed files and directories relative to a target branch
5454
* Between the last remote branch commit and the current HEAD.
5555
* Restricts change detection to a subset of files and directories:
5656
* Provides boolean output indicating changes in specific files.
57-
* Uses [Glob pattern](https://codepen.io/mrmlnc/pen/OXQjMe) matching.
57+
* Uses [Glob pattern](https://en.wikipedia.org/wiki/Glob_\(programming\)) matching.
5858
* Supports Globstar.
5959
* Supports brace expansion.
6060
* Supports negation.
@@ -386,6 +386,11 @@ To access more examples, navigate to the [Examples](#examples-) section.
386386
# Default: "false"
387387
exclude_submodules: ''
388388

389+
# Exclude symlinks from changed files.
390+
# Type: boolean
391+
# Default: "false"
392+
exclude_symlinks: ''
393+
389394
# Fail when the initial diff
390395
# fails.
391396
# Type: boolean
@@ -650,6 +655,12 @@ To access more examples, navigate to the [Examples](#examples-) section.
650655
# Default: "false"
651656
skip_initial_fetch: ''
652657

658+
# Do not fail when base
659+
# and head SHAs are identical.
660+
# Type: boolean
661+
# Default: "false"
662+
skip_same_sha: ''
663+
653664
# Tags pattern to ignore.
654665
# Type: string
655666
tags_ignore_pattern: ''
@@ -736,6 +747,7 @@ To access more examples, navigate to the [Examples](#examples-) section.
736747
| <a name="output_all_modified_files_count"></a>[all\_modified\_files\_count](#output_all_modified_files_count) | string | Returns the number of `all_modified_files` |
737748
| <a name="output_all_old_new_renamed_files"></a>[all\_old\_new\_renamed\_files](#output_all_old_new_renamed_files) | string | Returns only files that are <br>Renamed and lists their old <br>and new names. **NOTE:** This <br>requires setting `include_all_old_new_renamed_files` to `true`. <br>Also, keep in mind that <br>this output is global and <br>wouldn't be nested in outputs <br>generated when the `*_yaml_*` input <br>is used. (R) |
738749
| <a name="output_all_old_new_renamed_files_count"></a>[all\_old\_new\_renamed\_files\_count](#output_all_old_new_renamed_files_count) | string | Returns the number of `all_old_new_renamed_files` |
750+
| <a name="output_any_added"></a>[any\_added](#output_any_added) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs have been added. |
739751
| <a name="output_any_changed"></a>[any\_changed](#output_any_changed) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs have changed. This <br>defaults to `true` when no <br>patterns are specified. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*. |
740752
| <a name="output_any_deleted"></a>[any\_deleted](#output_any_deleted) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs have been deleted. <br>This defaults to `true` when <br>no patterns are specified. (D) |
741753
| <a name="output_any_modified"></a>[any\_modified](#output_any_modified) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs have been modified. <br>This defaults to `true` when <br>no patterns are specified. i.e. <br>*includes a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*. |

action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,14 @@ inputs:
227227
description: "Exclude changes to submodules."
228228
required: false
229229
default: "false"
230+
exclude_symlinks:
231+
description: "Exclude symlinks from changed files."
232+
required: false
233+
default: "false"
234+
skip_same_sha:
235+
description: "Do not fail when base and head SHAs are identical."
236+
required: false
237+
default: "false"
230238
fetch_missing_history_max_retries:
231239
description: "Maximum number of retries to fetch missing history."
232240
required: false
@@ -250,6 +258,8 @@ outputs:
250258
description: "Returns only files that are Added (A)."
251259
added_files_count:
252260
description: "Returns the number of `added_files`"
261+
any_added:
262+
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have been added."
253263
copied_files:
254264
description: "Returns only files that are Copied (C)."
255265
copied_files_count:
@@ -324,7 +334,7 @@ outputs:
324334
description: "Returns all changed YAML keys when the `files_yaml` input is used. i.e. key that contains any path that has either been added, copied, modified, and renamed (ACMR)"
325335

326336
runs:
327-
using: 'node20'
337+
using: 'node24'
328338
main: 'dist/index.js'
329339

330340
branding:

0 commit comments

Comments
 (0)