A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vercel/repository-dispatch below:

vercel/repository-dispatch: Utilities for working with dispatch events triggered by Vercel

@vercel/repository-dispatch

Utilities and types for working with repository_dispatch events triggered by Vercel.

Learn more

The ci-example shows common ways to use repository_dispatch events in a CI workflow for GitHub projects connected to Vercel.

on:
  repository_dispatch:
    types:
      # Deployment has been promoted to production (automatic or manual)
      - 'vercel.deployment.promoted'
      # Deployment has finished building and has automatically been promoted to production
      - 'vercel.deployment.success'
      # Deployment has finished building, but has not been promoted to production
      - 'vercel.deployment.ready'
      # Deployment has failed to build
      - 'vercel.deployment.error'
      # Deployment has been canceled
      - 'vercel.deployment.canceled'
      # Deployment canceled as a result of the ignored build script (https://vercel.com/docs/project-configuration/git-settings#ignored-build-step)
      - 'vercel.deployment.ignored'
      # Deployment canceled as a result of automatic deployment skipping (https://vercel.com/docs/monorepos#skipping-unaffected-projects)
      - 'vercel.deployment.skipped'
      # Deployment waiting to start building pending
      - 'vercel.deployment.pending'
      # Deployment has failed
      - 'vercel.deployment.failed'

NOTE: Wildcards are supported for the type field:

on:
  repository_dispatch:
    types:
      # All deployment events
      - 'vercel.deployment.*'
{
  "environment": "production",
  "git": {
    "ref": "main",
    "sha": "abcdef1234567890abcdef1234567890abcdef12",
    "shortSha": "abcdef1"
  },
  "id": "dpl_1234567890abcdefghijklmnopqrstuvwxyz",
  "project": {
    "id": "prj_abcdef1234567890abcdef1234567890",
    "name": "example-project"
  },
  "state": {
    "type": "pending"
  },
  "url": "https://example-project-abc123.vercel.app"
}

Note

View the complete Typescript definitions for this payload here.

  1. Checkout - Automatically checks out the ref from the SHA of the deployment.

Important

This should be used whenever your action needs to

  1. Checkout your repository
  2. The checkout should run in the context of the repository when the deployment was created.

This is required because GitHub repository_dispatch events are always triggered using the last commit on default branch as the GITHUB_SHA in the context of the workflow.

  1. Status - Automatically sets a commit status for the ref associated with the deployment.

Important

This should be used whenever your action needs to

  1. Checkout your repository
  2. The checkout should run in the context of the repository when the deployment was created.

This is required because GitHub repository_dispatch events are always triggered using the last commit on default branch as the GITHUB_SHA in the context of the workflow.

  1. Debug - Echos the repository dispatch event payload for debugging purposes.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4