Skip to main content
100%

git-diff-in-gh-actions.yaml

✓ Published0🌍 Public
Aamazingandyyy
Last edited Jun 21, 2021
Created on Jun 21, 2021

This example shows a GitHub Actions workflow that detects whether a git diff contains any changed files and conditionally triggers a subsequent step. It uses the shell command `git diff --stat` to check for uncommitted changes, then sets a workflow output named `files_changed` via the `::set-output::` syntax. The workflow uses the `steps.diff.outputs.files_changed` condition to gate a later confirmation step. The code relies on GitHub Actions’ built-in `run` and `if` keywords, with no external visualization libraries or rendering involved.

AI-generated description

Similar vizzes