A GitHub Actions library for working with percli
.
For each utility provided, check the source file to see the list of parameters available.
A standard workflow for Dashboard-as-Code that should suit in most cases. The default behavior for it is:
- on a PR: build + validate + preview + diff
- on default branch: build + validate + deploy
Example of usage:
jobs:
dac:
uses: perses/cli-actions/.github/workflows/[email protected]
with:
url: https://demo.perses.dev
directory: ./dac
server-validation: true
secrets:
username: ${{ secrets.USR }}
password: ${{ secrets.PWD }}
Wrapper around the percli apply
command.
Example of usage:
steps:
- name: Deploy the dashboards
uses: perses/cli-actions/actions/[email protected]
with:
directory: ./testdata/dashboards_folder
Wrapper around the percli dac build
command.
Example of usage:
steps:
- name: Build DaC definitions
uses: perses/cli-actions/actions/[email protected]
with:
directory: ./testdata/dac_folder
Wrapper around the percli dac diff
command. It appends the generated diffs as a comment in the pull-request.
Example of usage:
steps:
- name: Generate dashboard diffs
uses: perses/cli-actions/actions/[email protected]
with:
directory: ./testdata/resources_folder
project: previews
Install percli. Prerequisite to run the other actions.
Example of usage:
steps:
- name: Install percli
uses: perses/cli-actions/actions/[email protected]
with:
cli_version: "latest"
Wrapper around the percli login
command.
Example of usage:
steps:
- name: Login to the API server
uses: perses/cli-actions/actions/[email protected]
with:
url: https://demo.perses.dev
username: ${{ secrets.TEST_USERNAME }}
password: ${{ secrets.TEST_PASSWORD }}
Wrapper around the percli dac preview
command. It appends the links to the generated preview dashboards as a comment in the pull-request.
Example of usage:
steps:
- name: Generate dashboard previews
uses: perses/cli-actions/actions/[email protected]
with:
directory: ./testdata/dashboards_folder
prefix: test-preview
Wrapper around the percli lint
command.
Example of usage:
steps:
- name: Validate dashboards
uses: perses/cli-actions/actions/[email protected]
with:
directory: ./testdata/dashboards_folder