fix/ci: align GitHub Actions with the declared Go toolchain #15
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SCIP | |
| 'on': | |
| - push | |
| jobs: | |
| scip-go: | |
| runs-on: ubuntu-latest | |
| env: | |
| SRC_ACCESS_TOKEN: ${{ secrets.SRC_ACCESS_TOKEN }} | |
| SRC_ENDPOINT: ${{ secrets.SRC_ENDPOINT }} | |
| steps: | |
| - name: Skip upload when Sourcegraph secrets are not configured | |
| if: ${{ env.SRC_ENDPOINT == '' || env.SRC_ACCESS_TOKEN == '' }} | |
| run: echo "Skipping SCIP upload because SRC_ENDPOINT/SRC_ACCESS_TOKEN are not configured." | |
| - uses: actions/checkout@v5 | |
| if: ${{ env.SRC_ENDPOINT != '' && env.SRC_ACCESS_TOKEN != '' }} | |
| - name: Set up Go | |
| if: ${{ env.SRC_ENDPOINT != '' && env.SRC_ACCESS_TOKEN != '' }} | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Generate and upload SCIP index | |
| if: ${{ env.SRC_ENDPOINT != '' && env.SRC_ACCESS_TOKEN != '' }} | |
| uses: sourcegraph/scip-go-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| sourcegraph-token: ${{ env.SRC_ACCESS_TOKEN }} | |
| sourcegraph-url: ${{ env.SRC_ENDPOINT }} | |
| upload: true |