fix(tools): 👷 update CodeSee workflow to now work with PRs from forks (#43816)

* 👷 CodeSee now works with PRs in forks

This change updates the CodeSee Architecture Diagram workflow to enable PR diagrams from forks.

* Adds back in the run condition

Missed this bit when I was copying over the updated template, adding it back in.

* Ran prettier on the workflow file
This commit is contained in:
Grayson Hay
2021-10-12 09:26:04 -07:00
committed by GitHub
parent 43b2d2aab8
commit 9b3a8e6bcf

View File

@ -2,21 +2,24 @@ on:
push: push:
branches: branches:
- main - main
pull_request: pull_request_target:
types: [opened, synchronize, reopened] types: [opened, synchronize, reopened]
name: CodeSee Map name: CodeSee Map
jobs: jobs:
test_map_action: test_map_action:
if: ${{ github.actor != 'renovate[bot]' && github.actor != 'camperbot' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Run map action on action code if: ${{ github.actor != 'renovate[bot]' && github.actor != 'camperbot' }}
continue-on-error: true
name: Run CodeSee Map Analysis
steps: steps:
- name: checkout - name: checkout
id: checkout id: checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0 fetch-depth: 0
# codesee-detect-languages has an output with id languages. # codesee-detect-languages has an output with id languages.
@ -54,10 +57,26 @@ jobs:
# CodeSee Maps Rust support uses a static binary so there's no setup step required. # CodeSee Maps Rust support uses a static binary so there's no setup step required.
- name: run - name: Generate Map
id: run id: generate-map
uses: Codesee-io/codesee-map-action@latest uses: Codesee-io/codesee-map-action@latest
with: with:
step: map
github_ref: ${{ github.ref }}
languages: ${{ steps.detect-languages.outputs.languages }}
- name: Upload Map
id: upload-map
uses: Codesee-io/codesee-map-action@latest
with:
step: mapUpload
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }}
- name: Insights
id: insights
uses: Codesee-io/codesee-map-action@latest
with:
step: insights
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }} github_ref: ${{ github.ref }}
support_typescript: true