github / github/vscode-github-actions
Unable to find reusable workflow
- Lenguaje dominante
- TypeScript
- Estrellas
- 660
- Forks
- 213
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
**Describe the bug**
When leveraging local reusable workflows, i.e. referencing other workflows inside of the `.github/workflows/` directory, the extension claims that it cannot find the reusable workflow. The reusable workflow is indeed in the right place, and it executes successfully by Github Actions.
**To Reproduce**
Steps to reproduce the behavior:
1. With the following directory structure:
```dir
.github/workflows/
- base.yml
- reusable.yml
```
And the following workflows:
```yml
# base.yml
name: base
on:
pull_request:
permissions:
contents: read
id-token: write
jobs:
reusable:
uses: ./.github/workflows/reusable.yml
with:
EXAMPEL: example
```
```yml
# reusable.yml
name: reusable
on:
workflow_call:
inputs:
EXAMPLE:
description: Example.
type: string
required: true
permissions:
contents: read
id-token: write
jobs:
reusable:
name: Example
runs-on: ubuntu-latest
steps:
- name: Example step
run: echo "${{ inputs.EXAMPLE }}"
```
2. Go to `base.yml` in VS Code.
3. The linting error `Unable to find reusable workflow` is presented. In addition, this is the output from `Github Actions Language`:
```
[Error - 09:26:39] Request textDocument/documentLink failed.
Message: Request textDocument/documentLink failed with message: Invalid file reference: .github/workflows/reusable.yml
Code: -32603
```
**Expected behavior**
As this is indeed a valid file reference according to [github documentation](https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow), and since it does indeed execute successfully, this error should not occur.
**Screenshots**

**Extension Version**
`v0.26.1`
Guía de contribución
Línea de trabajo
Reproduce el fallo en VS Code usando base.yml y .github/workflows/reusable.yml, y luego inspecciona la solicitud documentLink y el manejo de las referencias a reusable-workflow. Confirma que se acepta la ruta local, que desaparece el error de linting y que el enlace al documento se resuelve sin un error Invalid file reference.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- github-actions, typescript, vscode
- Área
- ci-cd, tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100