-
Notifications
You must be signed in to change notification settings - Fork 410
Open
Description
We get the warning
Warning: Unable to validate code scanning workflow: error: getWorkflow() failed: Error: Expected to find a code scanning workflow file at /home/runner/_work/ProDriver-Safety-Path/ProDriver-Safety-Path/.github/workflows/nightly_codeql.yml, but no such file existed. This can happen if the currently running workflow checks out a branch that doesn't contain the corresponding workflow file.
in our custom CodeQL workflow. We check out our repository in a custom location and specify this location using source-root:
- name: Checkout
uses: actions/checkout@v4
if: always()
with:
path: "my-custom-path"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
source-root: "my-custom-path"
It looks like the bug is this code:
Lines 285 to 290 in c6e30a2
| async function getWorkflowAbsolutePath(logger: Logger): Promise<string> { | |
| const relativePath = await api.getWorkflowRelativePath(); | |
| const absolutePath = path.join( | |
| getRequiredEnvParam("GITHUB_WORKSPACE"), | |
| relativePath, | |
| ); |
Metadata
Metadata
Assignees
Labels
No labels