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.
Merge pull request #71 from theBeginner86/thebeginner86/chore/4
[chore] Fix request headers
- Loading branch information
Showing
6 changed files
with
107 additions
and
73 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
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
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
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Kanvas Screenshot Service | ||
on: # rebuild any PRs and main branch changes | ||
pull_request_target: | ||
types: [opened, synchronize, reopened] | ||
workflow_dispatch: | ||
inputs: | ||
contentID: | ||
description: ID of the design to render. | ||
required: true | ||
type: string | ||
assetLocation: | ||
required: true | ||
type: string | ||
description: Remote location where the generated asset (screenshot) for the design will be stored. | ||
workflow_call: | ||
inputs: | ||
contentID: | ||
description: ID of the design to render. | ||
required: true | ||
type: string | ||
assetLocation: | ||
required: true | ||
type: string | ||
description: Remote location where the generated asset (screenshot) for the design will be stored. | ||
outputs: | ||
resource_url: | ||
description: "The URL of the generated resource." | ||
value: ${{ jobs.KanvasScreenshot.outputs.resource_url }} | ||
permissions: | ||
actions: read | ||
contents: write | ||
security-events: write | ||
statuses: write | ||
pull-requests: write | ||
id-token: write | ||
|
||
jobs: | ||
KanvasScreenshot: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
resource_url: ${{ steps.test_result.outputs.resource_url }} | ||
steps: | ||
- name: Set PR number # To comment the final status on the Pull-request opened in any repository | ||
run: | | ||
export pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | ||
echo "PULL_NO=$pull_number" >> $GITHUB_ENV | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 #this step would go away | ||
with: | ||
path: action | ||
repository: layer5labs/kanvas-snapshot | ||
- run: | | ||
echo ${{ inputs.contentID }} | ||
echo ${{ inputs.assetLocation }} | ||
shell: bash | ||
- id: test_result | ||
uses: layer5labs/Kanvas-Snapshot@v0.2.13 | ||
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: "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
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