All Collections
How to integrate Probely with GitHub Actions
How to integrate Probely with GitHub Actions

Learn how to integrate Probely with GitHub Actions for Continuous Integration (CI) and Continuous Delivery (CD).

Jaime Vasconcelos avatar
Written by Jaime Vasconcelos
Updated over a week ago

To foster automation between systems, integrate Probely with GitHub Actions and trigger target scans from your GitHub.

First, you can start by reading about the Probely Target Scan action in the GitHub marketplace to understand it in more detail and, especially, some preparation steps around Probely. After that, the integration itself involves these two steps:

  1. Get integration information from Probely.

  2. Configure GitHub to integrate with Probely.

This article describes these steps in detail.

Step 1: Get integration information from Probely

Before configuring the integration in GitHub, get the necessary information from Probely:

  1. Get the Target Identifier:

    1. Go to the TARGETS tab in the Probely app.

    2. Click on the target and obtain the target identifier from the URL.

  2. Generate the API Key and save it to configure GitHub to be able to do actions in Probely. Learn how to generate an API Key.

Step 2: Configure GitHub to integrate with Probely

With the information from Probely, it is time to do the configuration in GitHub:

  1. Log in to the GitHub account and select the desired repository.

  2. Go to the Settings tab, expand Secrets and variables, and click on Actions.

  3. Click on New repository secret to add a secret with the value of the API Key to access Probely.

    Fill out the form fields:

    1. Set the Name with “PROBELY_API_KEY”.

    2. In the field Secret, put the API Key generated in Step 1: Get the integration information from Probely.

  4. Now, go to the Actions tab and click on New workflow.

  5. Click on the link set up a workflow yourself to open the form to configure the workflow:

    1. At the top, type “probely.yml” for the filename.

    2. Copy the code below and paste it to the editor of the workflow.

      # Sample workflow for scanning a target with Probely
      name: Scan a target with Probely

      # Runs on pushes targeting the default branch
      branches: ["main"]

      # Allows you to run this workflow manually from the Actions tab

      runs-on: ubuntu-latest
      - name: Scan with Probely
      id: probely-scan
      uses: Probely/probely-github-action@main
      api-key: ${{ secrets.PROBELY_API_KEY }}
      target-id: "<TARGET_ID>"
      region: "eu"

    3. Replace <TARGET_ID> with the target identifier obtained in Step 1: Get the integration information from Probely.

    4. Take note of the name of the workflow: “Scan a target with Probely”.

  6. Click on Commit changes… to create the workflow.
    The workflow starts automatically if the changes are committed to the main branch. Otherwise, if working in another branch, run the workflow as follows:

    1. Go to the Actions tab, and under All workflows, there should be a workflow called Scan a target with Probely. Click on it to see its details.

    2. Click the Run workflow dropdown and the Run workflow button to run and test the workflow.

From now on, every time there’s a push to main, it triggers the scan of the target with Probely.

Did this answer your question?