generated from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eti Ijeoma <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,25 @@ | ||
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" | ||
application_url: | ||
description: Design's source URI; location of the original manifests | ||
type: string | ||
designID: | ||
description: "The design uuid, example: 3c116d0a-49ea-4294-addc-d9ab34210662" | ||
contentID: | ||
description: ID of the design to render. | ||
required: true | ||
type: string | ||
assetLocation: | ||
description: The location of the snapshot url | ||
required: true | ||
type: string | ||
skipComment: | ||
description: Skip comment | ||
type: boolean | ||
prNumber: | ||
description: PR number | ||
description: Remote location where the generated asset (screenshot) for the design will be stored. | ||
workflow_call: | ||
inputs: | ||
fileName: | ||
description: Relative file path from the root directory | ||
required: true | ||
type: string | ||
default: "0" | ||
outputs: | ||
resource_url: | ||
description: The URL of the generated resource. | ||
value: ${{ jobs.KanvasScreenshot.outputs.resource_url }} | ||
permissions: | ||
actions: read | ||
contents: write | ||
|
@@ -45,23 +37,18 @@ jobs: | |
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 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: action | ||
repository: layer5labs/kanvas-snapshot | ||
- id: test_result | ||
uses: layer5labs/[email protected].25 | ||
uses: layer5labs/[email protected].20 | ||
with: | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} # github's personal access token example: "ghp_...." | ||
mesheryToken: ${{ secrets.GH_ACCESS_TOKEN }} # Meshery Cloud Authentication token, signin to meshery-cloud to get one, example: ey..... | ||
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 || 'Helm Chart' }} # your application type, could be any of three: "Kubernetes Manifest", "Docker Compose", "Helm Chart" | ||
assetLocation: ${{ inputs.assetLocation }} | ||
designID: ${{ inputs.designID }} | ||
application_url: '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 | ||
|
||
|
||
application_type: "Design" # your application type, could be any of three: "Kubernetes Manifest", "Docker Compose", "Helm Chart" | ||
skipComment: true | ||
designID: ${{ inputs.contentID }} # relative file-path from the root directory in the github-runner env, you might require to checkout the repository as described in step 2 | ||
assetLocation: ${{ inputs.assetLocation }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters