github: Make LGTM project ID configurable via environment variable
[strongswan.git] / .github / workflows / lgtm.yml
1 name: lgtm.com
2
3 on: [push]
4
5 env:
6   OS_NAME: linux
7
8 jobs:
9   pre-check:
10     runs-on: ubuntu-latest
11     outputs:
12       should_skip: ${{ steps.skip-check.outputs.should_skip }}
13     steps:
14       - id: skip-check
15         uses: fkirc/skip-duplicate-actions@master
16         with:
17           concurrent_skipping: 'same_content'
18
19   lgtm:
20     needs: pre-check
21     if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
22     runs-on: ubuntu-latest
23     env:
24       TEST: lgtm
25     steps:
26       - uses: actions/checkout@v2
27         with:
28           fetch-depth: 0
29       # we don't use github/codeql-action because we can't exclude queries there,
30       # so we continue to use the approach we used on Travis
31       - env:
32           LGTM_TOKEN: ${{ secrets.LGTM_TOKEN }}
33           LGTM_PROJECT: ${{ secrets.LGTM_PROJECT }}
34           BUILD_NUMBER: ${{ github.run_id }}
35           COMMIT_ID: ${{ github.sha }}
36           COMMIT_BASE: ${{ github.event.before }}
37         uses: ./.github/actions/default