github / github/vscode-github-actions
Error thrown in consuming workflows regarding JSON output values quotes
- Lingua principale
- TypeScript
- Stelle
- 660
- Fork
- 213
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Describe the bug**
Quotes in a reusable workflow's JSON output value is triggering an error in consuming workflows.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a reusable workflow with input and outputs, one of the output being this JSON value:
```yaml
outputs:
images:
value: '{"gcp": "${{ contains(inputs.registries, ''gcp'') && jobs.setup.outputs.gcp_image || '''' }}", "ecr": "${{ contains(inputs.registries, ''ecr'') && jobs.setup.outputs.ecr_image || '''' }}"}'
```
2. Use the first workflow in another workflow:
```yaml
build:
uses: acme/actions/.github/workflows/build.yaml@v1
```
3. See the following errors in the 2nd workflow file, but __at the line number__ from the 1st workflow file:
```
Unexpected symbol: 'gcp'''. Located at position 31 within expression: contains(inputs.registries, ''gcp'') && jobs.setup.outputs.gcp_image || '''' [Ln 72, Col 26]
Unexpected symbol: 'ecr'''. Located at position 31 within expression: contains(inputs.registries, ''ecr'') && jobs.setup.outputs.ecr_image || '''' [Ln 72, Col 120]
```
**Expected behavior**
The 1st workflow does not throw any errors when being run in Github Actions runners, so I'd expect no errors to be printed by this extension.
**Extension Version**
`v0.27.1`
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo l’errore con il reusable workflow e il consuming workflow mostrati nell’issue, usando come riferimento la versione dell’estensione indicata. Traccia le diagnostici prodotti per le espressioni JSON tra virgolette e verifica che la sintassi valida di GitHub Actions non segnali più errori nel consuming workflow né li associ alla riga errata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github-actions, typescript, vscode
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100