Accessing variable in format() method gives an error.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Accessing variable in format() method gives an error.
To Reproduce
Steps to reproduce the behavior:
-
Write a similar step in GitHub Action job:
- name: Output variable
run: |
my_variable ='blabla'
echo ${{ format('startOfString{0}', $my_variable ) }}
shell: bash
- name: Output variable
-
Run corresponding GitHub Action
-
See error :
"The workflow is not valid. .github/workflows/my_workflow_file.yml (Line: a, Col: b): Unexpected symbol: '$my_variable'. Located at position... "
Expected behavior
String with substituted value should be printed .
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [Windows]
- Browser [Microsoft Edge]
- Version [131]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction in .github/workflows/my_workflow_file.yml and review the GitHub Actions expression and shell-variable syntax used in the run block. Determine whether the reported error is handled by this toolkit or by workflow expression evaluation; done means confirming the responsible component and documenting or reproducing the expected substituted output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100