-
Notifications
You must be signed in to change notification settings - Fork 297
55 lines (51 loc) · 1.92 KB
/
scip-typescript.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: scip-typescript
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- '**.ts'
- '**.tsx'
- '**.js'
jobs:
scip-typescript:
if: github.repository == 'sourcegraph/cody'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # SECURITY: pin third-party action hashes
id: pnpm-install
with:
version: 8.6.7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install --frozen-lockfile
- run: pnpm dlx @sourcegraph/scip-typescript index --pnpm-workspaces --no-global-caches
- name: Upload SCIP to Cloud
run: pnpm dlx @sourcegraph/src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
env:
SRC_ENDPOINT: https://sourcegraph.com/
SRC_ACCESS_TOKEN: ${{ secrets.SRC_ACCESS_TOKEN_DOTCOM }}
- name: Upload SCIP to S2
run: pnpm dlx @sourcegraph/src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
env:
SRC_ENDPOINT: https://sourcegraph.sourcegraph.com/
SRC_ACCESS_TOKEN: ${{ secrets.SRC_ACCESS_TOKEN_S2 }}
- name: Upload lsif to Demo
run: pnpm dlx @sourcegraph/src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress || true
env:
SRC_ENDPOINT: https://demo.sourcegraph.com/
SRC_ACCESS_TOKEN: ${{ secrets.SRC_ACCESS_TOKEN_DEMO }}