Triggers
    • PDF

    Triggers

    • PDF

    Article Summary

    Triggers overview

    Triggers are events that kick off workflows

    Triggers are defined in a workflow file and are named after familiar Git commands push, pull_request (Design Review), issues, and release

    A trigger starts a workflow

    Action
    Trigger.

    Triggers are defined in workflow yaml files

    Here is part of an example workflow file:

    # .allspice/workflows/your_workflow.yml
    name: Generate BOM
    run-name: ${{ github.actor }} is testing out AllSpice Actions 🚀
    on:
      # Add your triggers here
      # You can use more than one trigger to run the same code
      push:
      issues:
        types: [opened, closed, reopened]
    
    jobs:
      Your_job:
       # Your job steps

    Examples of triggers

    • on push

      • Generate BOM

      • Check part numbers against component allow-list

      • Generate COGS

      • Check DRC rules are correct

    • on merge pull_request closed

      • Create release fabrication package

        • Copy approved files from design review to release zip file

        • Check file format and naming conventions have been used

          • Check and filter out problematic naming conventions PCB1234-V2_thisone-revG.pcb

      • Update PLM

      • Generate archival/compliance Design Review package of checklist/comments/attachments

      • Add firmware from linked repos

    • on release

      • Notify CM/JDM

      • Notify Planning/Purchasing

      • Backup/distribute files

    • on issue / pull_request_review_comment

      • New part request workflow

      • Smart comments allow you to add your own #tags in comments to trigger software

        • Create issue from comment

        • Add new checks to the main checklist from a comment

      • Integrate your native issue tracking / comment system using Actions or Webhooks

    List of triggers

    trigger event

    activity types

    create

    not applicable

    delete

    not applicable

    fork

    not applicable

    gollum (wiki)

    not applicable

    push

    not applicable

    issues

    opened, edited, closed, reopened, assigned, unassigned, milestoned, demilestoned, labeled, unlabeled

    issue_comment

    created, edited, deleted

    pull_request

    opened, edited, closed, reopened, assigned, unassigned, synchronize, labeled, unlabeled

    pull_request_review

    submitted, edited

    pull_request_review_comment

    created, edited

    release

    published, edited

    registry_package

    published

    For pull_request events, in GitHub Actions, the ref is refs/pull/:prNumber/merge, which is a reference to the merge commit preview. However, AllSpice.io has no such reference. Therefore, the ref in AllSpice.io Actions is refs/pull/:prNumber/head, which points to the head of pull request rather than the preview of the merge commit.


    Was this article helpful?