-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.36 KB
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Plugin Validation
on:
workflow_call: # https://docs.github.com/en/actions/using-workflows/reusing-workflows
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install node modules
run: npm install
- run: npm run build
name: Build the plugin
- name: Sign plugin
run: npm run sign
shell: bash
env:
GRAFANA_ACCESS_POLICY_TOKEN: ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }}
if: ${{ env.GRAFANA_ACCESS_POLICY_TOKEN != '' }} # https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
- name: Zip the plugin
uses: montudor/action-zip@v1
with:
args: zip -qr felixrelleum-geomapwms-panel.zip felixrelleum-geomapwms-panel
- name: Run validator
run: npx --yes @grafana/plugin-validator@latest -config ./plugin-validator-config.yml -sourceCodeUri file://. felixrelleum-geomapwms-panel.zip # https://github.com/grafana/plugin-validator
- name: Clean up
run: rm -r felixrelleum-geomapwms-panel.zip