Skip to content

This action allows you to create an annotation in Axiom.

License

Notifications You must be signed in to change notification settings

axiomhq/annotation-action

Repository files navigation

Annotation Action

GitHub Super-Linter CI Check dist/

This GitHub Action lets you create annotations in Axiom. For more information, see the Axiom documentation.

You can configure GitHub Actions using YAML syntax. For more information, see the GitHub documentation.

Prerequisites

Create annotations with GitHub Actions

To create an annotation when a deployment happens in GitHub, follow these steps:

  1. Add the following to the end of your GitHub Action file:

    - name: Add annotation in Axiom when a deployment happens
      uses: axiomhq/annotation-action@v0.1.0
      with:
        axiomToken: ${{ secrets.API_TOKEN }}
        datasets: DATASET_NAME
        type: 'production-release'
        time: '2024-01-01T00:00:00Z' # optional, defaults to now
        endTime: '2024-01-01T01:00:00Z' # optional, defaults to null
        title: 'Production deployment' # optional
        description: 'Commit ${{ github.event.head_commit.message }}' # optional
        url: 'https://example.com' # optional, defaults to job url
  2. In the code above, replace the following:

    • Replace DATASET_NAME with the Axiom dataset where you want to send data. To add the annotation to more than one dataset, enter a string of Axiom dataset names separated by commas. For example datasets: 'DATASET_NAME_1, DATASET_NAME_2, DATASET_NAME_3'.
    • Add the Axiom API token to your GitHub secrets, and replace API_TOKEN with the name of this secret.
  3. Customize the other fields of the code above such as the title, the description, and the URL.

This creates an annotation in Axiom each time you deploy in GitHub.

This action has the ID of the annotation as an output, read the ci.yaml to see how to use it.

About

This action allows you to create an annotation in Axiom.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •