Code scanning - action #348
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: 'Code scanning - action' | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| # push: | |
| # branches: [develop, ] | |
| # pull_request: | |
| # # The branches below must be a subset of the branches above | |
| # branches: [develop] | |
| schedule: | |
| - cron: '0 6 * * 5' | |
| jobs: | |
| config: | |
| uses: ./.github/workflows/reusable-config.yaml | |
| CodeQL-Build: | |
| runs-on: ubuntu-22.04 | |
| needs: config | |
| env: | |
| LIBCURL_RELEASE: ${{ needs.config.outputs.latest-libcurl-release }} | |
| LATEST_LIBCURL_RELEASE: ${{ needs.config.outputs.latest-libcurl-release }} | |
| ELECTRON_VERSION: '' | |
| PUBLISH_BINARY: false | |
| RUN_TESTS: false | |
| RUN_PREGYP_CLEAN: false | |
| GIT_COMMIT: ${{ github.sha }} | |
| GIT_REF_NAME: ${{ github.ref_name }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Install System Packages | |
| uses: ./.github/actions/install-system-packages | |
| # see https://github.com/nodejs/node/issues/40537 | |
| # - name: Enforce IPv4 Connectivity | |
| # uses: ./.github/actions/force-ipv4 | |
| # Initializes the CodeQL tools for scanning. | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: javascript, cpp | |
| # PNPM / Node.js | |
| - name: Setup Node and PNPM | |
| uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| node-version: '24' | |
| - name: Setup Libcurl Cache (Restore) | |
| id: libcurl-deps-cache | |
| uses: ./.github/actions/setup-libcurl-cache | |
| with: | |
| libcurl-release: ${{ needs.config.outputs.latest-libcurl-release }} | |
| node-version: '24' | |
| electron-version: '' | |
| electron-config-cache: ${{ needs.config.outputs.electron-config-cache }} | |
| mode: 'restore-only' | |
| - name: 'Build and Package Binary' | |
| run: ./scripts/ci/build.sh | |
| - name: 'Check if fully installed and built' | |
| id: built-and-installed | |
| run: | | |
| if [[ -f built-and-installed.hidden.txt ]]; then | |
| echo "built-and-installed.hidden.txt exists" | |
| echo "status=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "built-and-installed.hidden.txt does not exist" | |
| echo "status=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Setup Libcurl Cache (Save) | |
| if: steps.libcurl-deps-cache.outputs.cache-hit != 'true' && steps.built-and-installed.outputs.status == 'true' | |
| uses: ./.github/actions/setup-libcurl-cache | |
| with: | |
| libcurl-release: ${{ needs.config.outputs.latest-libcurl-release }} | |
| node-version: '24' | |
| electron-version: '' | |
| electron-config-cache: ${{ needs.config.outputs.electron-config-cache }} | |
| mode: 'save-only' | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 |