Skip to content

GitHub Action

You can easily integrate TangleGuard into your GitHub workflow by using the pre-built GitHub Action. You can do one of the following:

  • Validate: This checks your codebase regarding circular dependencies and fails the workflow if any are found. Useful for enforcing architecture rules in pull requests.
  • Upload: This uploads the result data to TangleGuard Cloud version, which provides a hosted analytics plattform.

Use this to validate your codebase for circular dependencies on every pull request. The workflow will fail if any circular dependencies are found.

name: Architecture Validation
on: [pull_request]
jobs:
validate-architecture:
runs-on: ubuntu-latest
steps:
- uses: TangleGuard/github-action@main
with:
upload_results: "true"
make_public: "true"
language: "rust"
fail_on_findings: "true"

Below you see an example output when circular dependencies are detected:

Terminal window
πŸ”„ Checking for circular dependencies...
πŸ“¦ Cross-package circular dependencies (2):
πŸ”„ content β†’ markdown β†’ templates β†’ content
πŸ”„ markdown β†’ templates β†’ markdown
🧩 Module-level circular dependencies (6):
πŸ“ content (6 cycles):
πŸ”„ content::library β†’ content::page β†’ content::library
πŸ”„ content::library β†’ content::ser β†’ content::library
πŸ”„ content::library β†’ content::ser β†’ content::page β†’ content::library
πŸ”„ content::library β†’ content::taxonomies β†’ content::library
πŸ”„ content::page β†’ content::ser β†’ content::page
πŸ”„ content::section β†’ content::ser β†’ content::section
❌ Found 8 circular dependencies (609.63¡s)

Set fail_on_findings: "false" if you want to see the validation results without failing the workflow.

It validates your codebase against your TangleGuard configuration file and hence regarding your predefined rules.

Here’s a simple example of how to use the GitHub Action in your workflow:

name: Architecture Check
on: [push, pull_request]
jobs:
upload-architecture:
runs-on: ubuntu-latest
steps:
- uses: TangleGuard/github-action@main
with:
upload_results: "true"
make_public: "true"
language: "rust"
description: "A static code analysis tool focused on code architecture."

Below you see the logs of the above upload-architecture job:

Terminal window
Scanning workspace and uploading results to TangleGuard Cloud...
_____ _ ___ _
/__ \__ _ _ __ __ _| | ___ / _ \_ _ __ _ _ __ __| |
/ /\/ _` | '_ \ / _` | |/ _ \/ /_\/ | | |/ _` | '__/ _` |
/ / | (_| | | | | (_| | | __/ /_\\| |_| | (_| | | | (_| |
\/ \__,_|_| |_|\__, |_|\___\____/ \__,_|\__,_|_| \__,_|
|___/
2026-01-07T18:06:40.907446Z INFO TangleGuard CLI - analyzing workspace at: .
2026-01-07T18:06:40.970551Z INFO Workspace scan completed in 63.09ms total
2026-01-07T18:06:40.970570Z INFO Successfully scanned workspace with 6 packages
2026-01-07T18:06:40.970574Z INFO No repository info provided, extracting from Git...
2026-01-07T18:06:40.993369Z INFO Extracted: TangleGuard/TangleGuard
2026-01-07T18:06:40.993671Z INFO Found origin
2026-01-07T18:06:41.035836Z INFO Uploading...
2026-01-07T18:06:42.725524Z INFO Successfully uploaded workspace to server!