Skip to content

Commit c97b002

Browse files
authored
Update kanvas.yml
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
1 parent 60909c2 commit c97b002

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

.github/workflows/kanvas.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,46 @@
1-
name: Kanvas Screenshot Service
2-
'on':
1+
name: Kanvas Snapshot Service
2+
on: # rebuild any PRs and main branch changes
33
pull_request_target:
4-
types:
5-
- opened
6-
- synchronize
7-
- reopened
4+
types: [opened, synchronize, reopened]
5+
86
workflow_call:
97
inputs:
10-
fileName:
8+
fileName:
119
description: Relative file path from the root directory
1210
required: true
1311
type: string
1412
outputs:
1513
resource_url:
16-
description: The URL of the generated resource.
17-
value: ${{ jobs.KanvasScreenshot.outputs.resource_url }}
18-
permissions:
14+
description: "The URL of the generated resource."
15+
value: ${{ jobs.MeshMapScreenshot.outputs.resource_url }}
16+
permissions:
1917
actions: read
2018
contents: write
2119
security-events: write
2220
statuses: write
2321
pull-requests: write
2422
id-token: write
23+
2524
jobs:
26-
KanvasScreenshot:
27-
runs-on: ubuntu-latest
25+
MeshMapScreenshot:
26+
runs-on: ubuntu-24.04
2827
outputs:
2928
resource_url: ${{ steps.test_result.outputs.resource_url }}
3029
steps:
31-
- name: Set PR number
30+
- name: Set PR number # To comment the final status on the Pull-request opened in any repository
3231
run: |
3332
export pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
3433
echo "PULL_NO=$pull_number" >> $GITHUB_ENV
3534
- uses: actions/checkout@v4
36-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v4 #this step would go away
3736
with:
3837
path: action
3938
repository: layer5labs/kanvas-snapshot
4039
- id: test_result
4140
uses: layer5labs/Kanvas-Snapshot@v0.2.32
4241
with:
43-
githubToken: ${{ secrets.GITHUB_TOKEN }}
44-
mesheryToken: ${{ secrets.MESHERY_TOKEN }}
45-
prNumber: ${{ env.PULL_NO }}
46-
application_type: Kubernetes Manifest
47-
filePath: ${{ inputs.fileName == '' && '.gitpod.yml' || inputs.fileName }}
42+
githubToken: ${{ secrets.GITHUB_TOKEN }} # github's personal access token example: "ghp_...."
43+
mesheryToken: ${{ secrets.MESHERY_TOKEN }} # Meshery Cloud Authentication token, signin to meshery-cloud to get one, example: ey.....
44+
prNumber: ${{ env.PULL_NO }} # auto-filled from the above step
45+
application_type: Kubernetes Manifest # your application type, could be any of three: "Kubernetes Manifest", "Docker Compose", "Helm Chart"
46+
filePath: ${{ inputs.fileName == '' && 'install/deployment_yamls/k8s' || inputs.fileName }} # relative file-path from the root directory in the github-runner env, you might require to checkout the repository as described in step 2

0 commit comments

Comments
 (0)