Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kanvas.yaml #77

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 14 additions & 20 deletions .github/workflows/kanvas.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Kanvas Screenshot Service
on: # rebuild any PRs and main branch changes
pull_request_target:
types: [opened, synchronize, reopened]
'on':
pull_request:
types:
- opened
- synchronize
- reopened
workflow_dispatch:
inputs:
contentID:
Expand All @@ -14,47 +17,38 @@ on: # rebuild any PRs and main branch changes
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:
fileName:
description: Relative file path from the root directory
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."
description: The URL of the generated resource.
value: ${{ jobs.KanvasScreenshot.outputs.resource_url }}
permissions:
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
- name: Set PR number
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
- uses: actions/checkout@v4
- uses: actions/checkout@v4
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.20
uses: layer5labs/kanvas-snapshot@v0.2.20
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.....
Expand Down
Loading