Skip to content

Ensure Files Changed

Actions
Ensures files specified were changed in a PR, or can be used to ensure files were not changed
v4.1.1
Latest
Star (2)

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/[email protected]
        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

Ensure Files Changed is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Ensures files specified were changed in a PR, or can be used to ensure files were not changed
v4.1.1
Latest

Ensure Files Changed is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.