Skip to content

danieljimeneznz/ensure-files-changed

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Repository files navigation

Ensure Files Changed

This action ensures that pull requests contain changes to the files listed in the require-change-file-patterns array specified, it will fail if these files were not changed or if files were changed that exist in the prevent-modification-file-patterns array.

Inputs

  • require-changes-to: A list of files (or glob patterns) that represent the files that should be modified by a PR.
  • prevent-changes-to: A list of files (or glob patterns) that represent the files that should not be modified by a PR.
  • token: The GitHub token used to create an authenticated client.

Example

name: 'build-test'
on:
  pull_request:
  push:
    branches:
      - "master"

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: npm ci
      - uses: danieljimeneznz/ensure-files-changed@v4.1.0
        with:
          require-changes-to: |
            package.json
            *.md
          prevent-changes-to: |
            LICENSE.md
          token: ${{ secrets.GITHUB_TOKEN }}

Credit to syeutyu/validate-changed-files for providing the base code

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%