diff --git a/.github/workflows/lsif.yml b/.github/workflows/lsif.yml deleted file mode 100644 index 644f5c6cb..000000000 --- a/.github/workflows/lsif.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: LSIF -on: - push: - paths: - - '**.go' - - 'go.mod' - - '.github/workflows/lsif.yml' -env: - GOPROXY: "https://proxy.golang.org" - -jobs: - lsif-go: - if: github.repository == 'gogs/gogs' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Generate LSIF data - uses: sourcegraph/lsif-go-action@master - - name: Upload LSIF data to sourcegraph.com - continue-on-error: true - uses: docker://sourcegraph/src-cli:latest - with: - args: lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} - - name: Upload LSIF data to S2 - continue-on-error: true - uses: docker://sourcegraph/src-cli:latest - with: - args: -endpoint=https://sourcegraph.sourcegraph.com lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} - - name: Upload LSIF data to cs.unknwon.dev - continue-on-error: true - uses: docker://sourcegraph/src-cli:latest - with: - args: -endpoint=https://cs.unknwon.dev lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/scip.yml b/.github/workflows/scip.yml new file mode 100644 index 000000000..0310cfb76 --- /dev/null +++ b/.github/workflows/scip.yml @@ -0,0 +1,38 @@ +name: SCIP +on: + push: + paths: + - '**.go' + - 'go.mod' + - '.github/workflows/scip.yml' +env: + GOPROXY: "https://proxy.golang.org" + +jobs: + scip-go: + if: github.repository == 'gogs/gogs' + runs-on: ubuntu-latest + container: sourcegraph/scip-go + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set directory to safe for git + run: git config --global --add safe.directory $GITHUB_WORKSPACE + - name: Get src-cli + run: | + curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/local/bin/src + chmod +x /usr/local/bin/src + - name: Generate SCIP data + run: scip-go --no-animation + - name: Upload SCIP data to sourcegraph.com + run: src code-intel upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress -repo=github.com/gogs/gogs + env: + SRC_ENDPOINT: https://sourcegraph.com/ + - name: Upload SCIP data to S2 + run: src code-intel upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress -repo=github.com/gogs/gogs + env: + SRC_ENDPOINT: https://sourcegraph.sourcegraph.com/ + - name: Upload SCIP data to cs.unknwon.dev + run: src code-intel upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress -repo=github.com/gogs/gogs + env: + SRC_ENDPOINT: https://cs.unknwon.dev/