|
1 | | -name: Kanvas Screenshot Service |
2 | | -'on': |
| 1 | +name: Kanvas Snapshot Service |
| 2 | +on: # rebuild any PRs and main branch changes |
3 | 3 | pull_request_target: |
4 | | - types: |
5 | | - - opened |
6 | | - - synchronize |
7 | | - - reopened |
| 4 | + types: [opened, synchronize, reopened] |
| 5 | + |
8 | 6 | workflow_call: |
9 | 7 | inputs: |
10 | | - fileName: |
| 8 | + fileName: |
11 | 9 | description: Relative file path from the root directory |
12 | 10 | required: true |
13 | 11 | type: string |
14 | 12 | outputs: |
15 | 13 | 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: |
19 | 17 | actions: read |
20 | 18 | contents: write |
21 | 19 | security-events: write |
22 | 20 | statuses: write |
23 | 21 | pull-requests: write |
24 | 22 | id-token: write |
| 23 | + |
25 | 24 | jobs: |
26 | | - KanvasScreenshot: |
27 | | - runs-on: ubuntu-latest |
| 25 | + MeshMapScreenshot: |
| 26 | + runs-on: ubuntu-24.04 |
28 | 27 | outputs: |
29 | 28 | resource_url: ${{ steps.test_result.outputs.resource_url }} |
30 | 29 | steps: |
31 | | - - name: Set PR number |
| 30 | + - name: Set PR number # To comment the final status on the Pull-request opened in any repository |
32 | 31 | run: | |
33 | 32 | export pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") |
34 | 33 | echo "PULL_NO=$pull_number" >> $GITHUB_ENV |
35 | 34 | - uses: actions/checkout@v4 |
36 | | - - uses: actions/checkout@v4 |
| 35 | + - uses: actions/checkout@v4 #this step would go away |
37 | 36 | with: |
38 | 37 | path: action |
39 | 38 | repository: layer5labs/kanvas-snapshot |
40 | 39 | - id: test_result |
41 | 40 | uses: layer5labs/Kanvas-Snapshot@v0.2.32 |
42 | 41 | 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