generated from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 16
65 lines (63 loc) · 2.4 KB
/
kanvas.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Kanvas Screenshot Service
'on':
pull_request:
types:
- opened
- synchronize
- reopened
workflow_call:
workflow_dispatch:
inputs:
application_type:
description: Type of the application (e.g., Helm Chart, Kubernetes Manifest, Docker Compose)
type: string
default: "Helm Chart"
designID:
description: "The design uuid, example: 3c116d0a-49ea-4294-addc-d9ab34210662"
type: string
assetLocation:
description: The location of the snapshot url
type: string
skipComment:
description: Skip comment
type: boolean
prNumber:
description: PR number
type: string
default: "0"
permissions:
actions: read
contents: write
security-events: write
statuses: write
pull-requests: write
id-token: write
jobs:
KanvasScreenshot:
runs-on: ubuntu-24.04
outputs:
resource_url: ${{ steps.test_result.outputs.resource_url }}
steps:
- name: Set PR number
run: |
export pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
echo "PULL_NO=$pull_number" >> $GITHUB_ENV
if [ "$pull_number" = "null" ]; then
echo "PULL_NO=${{ inputs.prNumber }}" >> $GITHUB_ENV
fi
echo "MESHERY_TOKEN=${{ secrets.MESHERY_TOKEN }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
path: action
repository: layer5labs/kanvas-snapshot
- id: test_result
uses: layer5labs/[email protected]
with:
githubToken: ${{ secrets.GITHUB_TOKEN }} # github's personal access token example: "ghp_...."
mesheryToken: ${{ secrets.MESHERY_TOKEN }} # Meshery Cloud Authentication token, signin to meshery-cloud to get one, example: ey.....
prNumber: ${{ env.PULL_NO }} # auto-filled from the above step
application_type: ${{ inputs.application_type }} # your application type, could be any of three: "Kubernetes Manifest", "Docker Compose", "Helm Chart"
assetLocation: ${{ inputs.assetLocation }}
designID: ${{ inputs.designID }}
filePath: ${{ env.PULL_NO == '0' && 'https://meshery.github.io/meshery.io/charts/meshery-v0.7.109.tgz' }} # relative file-path from the root directory in the github-runner env, you might require to checkout the repository as described in step 2