Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ jobs:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Test changed-files
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# -----------------------------------------------------------------------------------------------------------
# Example 1
# -----------------------------------------------------------------------------------------------------------
- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
# with:
# since_last_remote_commit: true
Expand All @@ -123,7 +123,7 @@ jobs:
# -----------------------------------------------------------------------------------------------------------
- name: Get all changed markdown files
id: changed-markdown-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
# Avoid using single or double quotes for multiline patterns
files: |
Expand All @@ -144,7 +144,7 @@ jobs:
# -----------------------------------------------------------------------------------------------------------
- name: Get all test, doc and src files that have changed
id: changed-files-yaml
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
files_yaml: |
doc:
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
# -----------------------------------------------------------------------------------------------------------
- name: Get changed files in the docs folder
id: changed-files-specific
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
files: docs/*.{js,html} # Alternatively using: `docs/**`
files_ignore: docs/static.js
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
steps:
- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47

- name: List all changed files
env:
Expand Down Expand Up @@ -258,13 +258,13 @@ jobs:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Test changed-files
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.

- name: List all changed files
Expand Down Expand Up @@ -303,7 +303,7 @@ To access more examples, navigate to the [Examples](#examples-) section.
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->

```yaml
- uses: step-security/changed-files@v46
- uses: step-security/changed-files@v47
id: changed-files
with:
# Github API URL.
Expand Down Expand Up @@ -800,7 +800,7 @@ The format of the version string is as follows:
...
- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
...
```

Expand All @@ -813,7 +813,7 @@ The format of the version string is as follows:
...
- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
safe_output: false # set to false because we are using an environment variable to store the output and avoid command injection.

Expand All @@ -836,7 +836,7 @@ The format of the version string is as follows:
...
- name: Get all changed files and use a comma separator in the output
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
separator: ","
...
Expand All @@ -853,7 +853,7 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47

- name: List all added files
env:
Expand All @@ -876,7 +876,7 @@ See [outputs](#outputs) for a list of all available outputs.
...
- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47

- name: Run a step if my-file.txt was modified
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
Expand All @@ -897,7 +897,7 @@ See [outputs](#outputs) for a list of all available outputs.

- name: Get changed files and write the outputs to a Txt file
id: changed-files-write-output-files-txt
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
write_output_files: true

Expand All @@ -916,7 +916,7 @@ See [outputs](#outputs) for a list of all available outputs.
...
- name: Get changed files and write the outputs to a JSON file
id: changed-files-write-output-files-json
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
json: true
write_output_files: true
Expand All @@ -936,7 +936,7 @@ See [outputs](#outputs) for a list of all available outputs.
...
- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
files: |
my-file.txt
Expand All @@ -959,7 +959,7 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files
id: changed-files-specific
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
files: |
my-file.txt
Expand Down Expand Up @@ -1010,7 +1010,7 @@ See [outputs](#outputs) for a list of all available outputs.
...
- name: Get changed files using a source file or list of file(s) to populate to files input.
id: changed-files-specific-source-file
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
files_from_source_file: test/changed-files-list.txt
...
Expand All @@ -1027,7 +1027,7 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files using 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: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
files_from_source_file: |
test/changed-files-list.txt
Expand All @@ -1048,7 +1048,7 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files using a different SHA
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
sha: ${{ github.event.pull_request.head.sha }}
...
Expand All @@ -1065,7 +1065,7 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files using a different base SHA
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
base_sha: ${{ github.event.pull_request.base.sha }}
...
Expand All @@ -1091,13 +1091,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47

- name: List changed files
env:
Expand All @@ -1107,7 +1107,7 @@ jobs:

- name: Get changed files in the .github folder
id: changed-files-specific
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
files: .github/**

Expand All @@ -1131,14 +1131,14 @@ See [inputs](#inputs) for more information.
```yaml
...
- name: Checkout into dir1
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
path: dir1

- name: Run changed-files with defaults in dir1
id: changed-files-for-dir1
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
path: dir1

Expand All @@ -1163,13 +1163,13 @@ See [inputs](#inputs) for more information.
...
- name: Run changed-files with quotepath disabled
id: changed-files-quotepath
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
quotepath: "false"

- name: Run changed-files with quotepath disabled for a specified list of file(s)
id: changed-files-quotepath-specific
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
files: test/test-è.txt
quotepath: "false"
Expand Down Expand Up @@ -1202,7 +1202,7 @@ See [inputs](#inputs) for more information.

- name: Run changed-files with the commit of the last successful test workflow run
id: changed-files-base-sha-push
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
...
Expand All @@ -1229,7 +1229,7 @@ See [inputs](#inputs) for more information.

- name: Run changed-files with the commit of the last successful test workflow run on the main branch
id: changed-files-base-sha-pull-request
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
...
Expand All @@ -1255,7 +1255,7 @@ See [inputs](#inputs) for more information.
...
- name: Run changed-files with dir_names
id: changed-files-dir-names
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
dir_names: "true"
...
Expand All @@ -1272,7 +1272,7 @@ See [inputs](#inputs) for more information.
...
- name: Run changed-files with JSON output
id: changed-files-json
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
json: "true"
...
Expand All @@ -1289,13 +1289,13 @@ See [inputs](#inputs) for more information.
...
- name: Get changed-files since 2022-08-19
id: changed-files-since
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
since: "2022-08-19"

- name: Get changed-files until 2022-08-20
id: changed-files-until
uses: step-security/changed-files@v46
uses: step-security/changed-files@v47
with:
until: "2022-08-20"
...
Expand Down
Loading