How to use the @actions/github.context.eventName function in @actions/github

To help you get started, we’ve selected a few @actions/github examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JasonEtco / action-record / src / run-event.ts View on Github external
export default async function runEvent () {
  // Create the ActionRecord instance
  const actionRecord = new ActionRecord()
  // Register the models, setting actionRecord.models
  await registerModels(actionRecord)
  // Find the event function
  const eventFn = findEventFunction(context.eventName)
  if (eventFn) {
    // Run it
    return eventFn(actionRecord)
  }
}

@actions/github

Actions github lib

MIT
Latest version published 6 months ago

Package Health Score

93 / 100
Full package analysis