Skip to content
arrow-up-circle

GitHub Action

Monte Carlo Apply Monitors

v5 Latest version

Monte Carlo Apply Monitors

arrow-up-circle

Monte Carlo Apply Monitors

Apply montecarlo monitors

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Monte Carlo Apply Monitors

uses: ovotech/montecarlo-monitors-deploy@v5

Learn more about this action in ovotech/montecarlo-monitors-deploy

Choose a version

montecarlo-monitors-deploy

This action provides the following functionality for GitHub Actions users:

  • Connect to Monte Carlo
  • Performs a dry run of monitors on feature branches (optional)
  • Deploys monitors to Monte Carlo (deploys by default, but suggested to only deploy on merge to main)

Basic usage

You will first need to generate an API ID and API key, and store these as secrets in your repo.

To use the action as is your YAML monitors will need to live in a folder called monitors (this can be overridden) containing sub-folders by namespace.

steps:       
    - name: MonteCarlo Dry Run Monitors
      if: github.ref != 'refs/heads/main'
      uses: ovotech/montecarlo-monitors-deploy@v4
      with:
        MCD_DEFAULT_API_ID: ${{secrets.MCD_DEFAULT_API_ID}}
        MCD_DEFAULT_API_TOKEN: ${{secrets.MCD_DEFAULT_API_TOKEN}}     
        DRY_RUN: 'true'  
       
    - name: MonteCarlo Apply Monitors
      if: github.ref == 'refs/heads/main'
      uses: ovotech/montecarlo-monitors-deploy@v4
      with:
        MCD_DEFAULT_API_ID: ${{secrets.MCD_DEFAULT_API_ID}}
        MCD_DEFAULT_API_TOKEN: ${{secrets.MCD_DEFAULT_API_TOKEN}}     
        DRY_RUN: 'false'