https://github.com/foodee/pr-includes-file-change
Simple action to determine if a PR contains a file change
https://github.com/foodee/pr-includes-file-change
Last synced: 11 months ago
JSON representation
Simple action to determine if a PR contains a file change
- Host: GitHub
- URL: https://github.com/foodee/pr-includes-file-change
- Owner: Foodee
- License: mit
- Created: 2020-01-02T23:25:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-18T19:20:38.000Z (almost 4 years ago)
- Last Synced: 2024-11-17T20:49:58.570Z (over 1 year ago)
- Language: JavaScript
- Size: 848 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action: Detect PR file changes
Detects whether or not a file in a provided path has been changed.
Useful for preventing steps in workflows, can provide multiple paths as regular expressions
## Example Usage
```yaml
name: Test Workflow
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
steps:
- name: Get Changed Files
id: changed
uses: foodee/pr-includes-file-change@master
with:
paths: ^asdf.js ^main.js
- name: Echo Match
if: steps.changed.outputs.matched == 'true'
run: echo Matched
```