garak icon indicating copy to clipboard operation
garak copied to clipboard

add automation action for plugin_cache.json

Open jmartin-tech opened this issue 6 months ago • 0 comments

Maintain the distributed plugin_cache.json via github action preformed on merge of PRs to main.

  • more tolerant cache validation
    • cache rebuild allows for and empty cache file containing only {}
  • new automation action triggered on push to main or manual branch trigger
    • run on push to main
    • only commit when changes are found
    • cancel if a new commit is pushed to same branch including main ( avoids race conditions on cache update )
    • do not commit changes on branch trigger ( only log if changes exist )
    • do not execute when only cache file is updated ( avoids commit loop by automation )

Noted quirks:

  • concurrency limit - workflow cancelled by a new commit will mark the commit as failing automation, the subsequent completion will mark only the last push as passing tests
  • Commit by automation to main does not trigger a full new test run ( metadata only change makes this reasonable )

jmartin-tech avatar Aug 06 '24 06:08 jmartin-tech