All Projects → tj-actions → verify-changed-files

tj-actions / verify-changed-files

Licence: MIT license
Github action to verify file changes that occur during the workflow execution.

Programming Languages

shell
77523 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to verify-changed-files

changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+1082.26%)
Mutual labels:  actions, changed-file, workflows, change-detection, github-actions
ssh2actions
Connect to GitHub Actions VM via SSH for interactive debugging
Stars: ✭ 62 (+0%)
Mutual labels:  actions, workflows, github-actions
recent-activity
Add your recent activity to your profile readme!
Stars: ✭ 87 (+40.32%)
Mutual labels:  actions, workflows, github-actions
nrwl-nx-action
A GitHub Action to wrap Nrwl Nx commands in your workflows.
Stars: ✭ 163 (+162.9%)
Mutual labels:  actions, workflows, github-actions
branch-names
Github action to retrieve branch or tag names with support for all events.
Stars: ✭ 99 (+59.68%)
Mutual labels:  actions, workflows, github-actions
public-ip
Queries GitHub actions runner's public IP address
Stars: ✭ 64 (+3.23%)
Mutual labels:  actions, github-actions
gh-action-get-changed-files
GitHub Action that saves changed files as JSON for use by other actions.
Stars: ✭ 82 (+32.26%)
Mutual labels:  actions, github-actions
k8s-create-secret
GitHub Action to create Kubernetes cluster secrets
Stars: ✭ 24 (-61.29%)
Mutual labels:  actions, github-actions
clojure-dependency-update-action
A simple GitHub Actions job to create Pull Requests for outdated dependencies in clojure projects
Stars: ✭ 37 (-40.32%)
Mutual labels:  actions, github-actions
action.playbook
Github Action for running Ansible Playbooks.
Stars: ✭ 26 (-58.06%)
Mutual labels:  actions, github-actions
csharp-docs-generator
An action that generates html documentation for C# programs to use for GitHub pages.
Stars: ✭ 21 (-66.13%)
Mutual labels:  actions, github-actions
add-an-issue-reference-action
A GitHub Action for adding a related issue reference to a pull request.
Stars: ✭ 19 (-69.35%)
Mutual labels:  actions, github-actions
actions
A set of GitHub actions for Infracost. See cloud cost estimates for Terraform in pull requests. 💰📉 Love your cloud bill!
Stars: ✭ 147 (+137.1%)
Mutual labels:  actions, github-actions
python-actions-alpha-archived
Please note that this was for the *alpha* version of GitHub Actions for Python.
Stars: ✭ 15 (-75.81%)
Mutual labels:  actions, github-actions
chrome-addon
☁ GitHub action to upload addon to Chrome
Stars: ✭ 53 (-14.52%)
Mutual labels:  actions, github-actions
scan-action
Anchore container analysis and scan provided as a GitHub Action
Stars: ✭ 140 (+125.81%)
Mutual labels:  actions, github-actions
action-netlify-deploy
🙌 Netlify deployments via GitHub actions
Stars: ✭ 32 (-48.39%)
Mutual labels:  actions, github-actions
dart-package-publisher
Action to Publish Dart / Flutter Package To https://pub.dev When you need to publish a package, just bump the version in pubspec.yaml
Stars: ✭ 45 (-27.42%)
Mutual labels:  actions, github-actions
setup-jdk
(DEPRECATED) Set up your GitHub Actions workflow with a specific version of AdoptOpenJDK
Stars: ✭ 32 (-48.39%)
Mutual labels:  actions, github-actions
actions-deploy-gist
📌 Deploy file to Github Gist
Stars: ✭ 26 (-58.06%)
Mutual labels:  actions, github-actions

Codacy Badge CI Update release version. Public workflows that use this action.

Ubuntu Mac OS Windows

All Contributors

verify-changed-files

Verify that certain files or directories did or did not change during the workflow execution.

NOTE: ⚠️

  • This action only detects files that have pending uncommited changes generated during the workflow execution, for running a specific step when a file changes in a pull request or based on a new commit

    See: https://github.com/tj-actions/changed-files

Features

  • Fast execution (0-2 seconds on average).
  • Easy to debug.
  • Scales to large repositories.
  • Supports all platforms (Linux, MacOS, Windows).
  • GitHub-hosted runners support
  • GitHub Enterprise Server support.
  • self-hosted runners support.
  • Boolean output for detecting uncommited changes.
  • List all files that changed during the workflow execution.
  • Restrict change detection to a subset of files:

Usage

...
    steps:
      - uses: actions/checkout@v2

      - name: Change text file
        run: |
          echo "Modified" > new.txt

      - name: Change file in directory
        run: |
          echo "Changed" > test_directory/new.txt

      - name: Verify Changed files
        uses: tj-actions/[email protected]
        id: verify-changed-files
        with:
          files: |
             *.txt
             test_directory
             action.yml
             **/*.py
             **/*.jpeg
             !*.sql

      - name: Run step only when files change.
        if: steps.verify-changed-files.outputs.files_changed == 'true'
        run: |
          echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"
        # Outputs: "Changed files: new.txt test_directory/new.txt"

Using the contains function.

...
      - name: Verify Changed files
        uses: tj-actions/[email protected]
        id: verify-changed-files
        with:
          files: |
             new.txt
             test_directory

      - name: Perform action when test_directory changes
        if: contains(steps.verify-changed-files.outputs.changed_files, 'test_directory')
        run: |
          echo "test_directory has changed."

If you feel generous and want to show some extra appreciation:

Support this project with a

Buy me a coffee

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
autocrlf string true "input" Modify the git config core.autocrlf.
files string true File/Directory names to check for
uncommited changes.
separator string true " " Output string separator.

Outputs

OUTPUT TYPE DESCRIPTION
changed_files string List of changed files
files_changed string Boolean indicating that files have
changed.

Contributors

Thanks goes to these wonderful people (emoji key):


Max Kahnt

📖

William Killerud

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].