You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
ZyAction: Verify Changed Files
v1.0.0
A GitHub Action to verify file changes that occur during workflow execution.
- Lists all files that changed during a workflow execution
- Supports glob patterns to restrict change detection to a subset of files
- Fast execution
- Scales to large repositories
- Supports all platforms (Linux, macOS, Windows)
- Does not use external dependencies
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
- name: Change Files
run: |
echo "test" > test/new.txt
echo "test" > unstaged.txt
- name: Verify Changed Files
id: verify-changes
uses: zyactions/verify-changed-files@master
- name: Run only if one of the files has changed
if: steps.verify-changes.outputs.changed-files != ''
run: |
echo "Changed Files:"
echo "${{ steps.verify-changes.outputs.changed-files }}"
- name: Run only if 'unstaged.txt' has changed
if: contains(steps.verify-changes.outputs.changed-files, 'unstaged.txt')
run: |
echo "Detected changes to 'unstaged.txt'"
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
# ...
- name: Verify Changed Files
id: verify-changes
uses: zyactions/verify-changed-files@master
with:
path: |
test/*
unstaged.txt
Check out the glob pattern cheat sheet for reference. Multi line patterns must be specified without quotes.
path:
# A file, directory or wildcard pattern that describes which files to verify.
# Supports multi-line strings. Matches all files, if set to the empty string.
type: string
default: '**/*'
separator:
# A character- or string to be used to separate the individual file names in
# the output list. Any filename containing this separator will be enclosed
# in double quotes. Defaults to the newline character '\n', if set to the
# empty string.
type: string
default: "\n"
exclude-ignored:
# Whether to exclude '.gitignore' ignored files for added files detection.
type: boolean
default: true
changed-files:
# The list of all changed files, or an empty string.
type: string
This action does not use external dependencies.
Note
Using external GitHub Actions dependencies within an action negates the security benefits of pinning to a specific commit hash if they (the dependencies) are not also pinned.
Versions follow the semantic versioning scheme.
Verify Changed Files Action is licensed under the MIT license.