Bret’s Reusable Workflow Conventions

  • Store all reusable workflows in a single repo
    • actions, gha-reusable, or reusable-workflows are all fine names
  • Standardize naming of "calling" versus "callable" workflow files
    • Called/callable reusable workflows: reusable-*.yml
    • Calling workflows: call-*.yml
  • Permissions should be set in both calling --> reusable
  • Don’t mix workflow_call with push or pull_request events in the same file
  • Reusable workflow repos should have a local calling workflow to test it
    • This may mean adding a sample Dockerfile and other file types as test data
  • Reusable workflow repos- should have a ./template/ full of calling workflow examples
  • Example of these conventions bretfisher/docker-build-workflow
slide 77 (click 0 of 13)