Skip to content

Dogfood set-codeql-language-matrix in its own codeql.yml - #28

Merged
felickz merged 1 commit into
mainfrom
copilot/setup-codeql-ci-check
Aug 5, 2026
Merged

felickz merged 1 commit into
mainfrom
copilot/setup-codeql-ci-check

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Problem

codeql.yml used the default GitHub-generated workflow with a static, hardcoded language matrix (python only). Changes to this action's own code (main.py, Dockerfile, entrypoint.sh, action.yml) had no automated check exercising the actual Docker build and matrix-generation logic.

Changes

  • create-matrix job: checks out the repo and invokes the action from the local checkout (uses: ./) against github.event.repository.languages_url, building the Docker image fresh on every run.
  • analyze job: now consumes needs.create-matrix.outputs.matrix instead of the hardcoded python entry, and is skipped entirely (if: needs.create-matrix.outputs.matrix != '[]') when the matrix is empty.

Because the workflow references ./ rather than a pinned tag (e.g. @v1), any future change to the action is built and run as part of this repo's own CI/CodeQL workflow:

create-matrix:
  runs-on: ubuntu-latest
  outputs:
    matrix: ${{ steps.set-matrix.outputs.matrix }}
  steps:
    - uses: actions/checkout@v7
    - id: set-matrix
      uses: ./
      with:
        access-token: ${{ secrets.GITHUB_TOKEN }}
        endpoint: ${{ github.event.repository.languages_url }}

analyze:
  needs: create-matrix
  if: ${{ needs.create-matrix.outputs.matrix != '[]' }}
  strategy:
    matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }}

Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 5, 2026 03:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because there is no eligible user to bill. To allow Copilot reviews on bot-authored pull requests, enable direct organization billing in your organization's Copilot settings.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@felickz
felickz marked this pull request as ready for review August 5, 2026 03:12
@felickz
felickz merged commit 2ee55ea into main Aug 5, 2026
5 checks passed
@felickz
felickz deleted the copilot/setup-codeql-ci-check branch August 5, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants