From 82cff15abda62a0a37f973898453acbc57118e07 Mon Sep 17 00:00:00 2001 From: "meshery[bot]" <109629516+meshery[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:10:21 +0000 Subject: [PATCH] Install meshmap workflow --- .github/workflows/meshmap.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/meshmap.yml b/.github/workflows/meshmap.yml index 05d5ee3b599..32710fc42fa 100644 --- a/.github/workflows/meshmap.yml +++ b/.github/workflows/meshmap.yml @@ -1,46 +1,47 @@ name: MeshMap Screenshot Service -on: # rebuild any PRs and main branch changes +'on': pull_request_target: - types: [opened, synchronize, reopened] - + types: + - opened + - synchronize + - reopened workflow_call: inputs: - fileName: + fileName: description: Relative file path from the root directory required: true type: string outputs: resource_url: - description: "The URL of the generated resource." + description: The URL of the generated resource. value: ${{ jobs.MeshMapScreenshot.outputs.resource_url }} -permissions: +permissions: actions: read contents: write security-events: write statuses: write pull-requests: write id-token: write - jobs: MeshMapScreenshot: 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/meshmap-snapshot - id: test_result - uses: layer5labs/MeshMap-Snapshot@v0.2.3 + uses: ${GITHUB_REF/refs/tags//} with: - githubToken: ${{ secrets.GITHUB_TOKEN }} # github's personal access token example: "ghp_...." - providerToken: ${{ secrets.PROVIDER_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: Kubernetes Manifest # your application type, could be any of three: "Kubernetes Manifest", "Docker Compose", "Helm Chart" - 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 + githubToken: ${{ secrets.GITHUB_TOKEN }} + mesheryToken: ${{ secrets.MESHERY_TOKEN }} + prNumber: ${{ env.PULL_NO }} + application_type: Kubernetes Manifest + filePath: ${{ inputs.fileName == '' && '.github/workflows/meshmap.yml' || inputs.fileName }}