`continue-on-error` cannot evaluate expression on environment variable
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
jobs/continue-on-error cannot use environment variable in expression
To Reproduce
Using an expression in continue-on-error like this:
env:
fullySupportedScalaVersions: "2.13.6"
test:
runs-on: ubuntu-latest
continue-on-error: ${{ contains(env.fullySupportedScalaVersions, matrix.scalaVersion) }}
Expected behavior
fullySupportedScalaVersions should be used to interpolate the expression
Runner Version and Platform
Version of your runner: latest
OS of the machine running the runner: ubuntu-latest
What's not working?
Invalid workflow file : .github/workflows/main.yml#L38
The workflow is not valid. .github/workflows/main.yml (Line: 38, Col: 24): Unrecognized named-value: 'env'. Located at position 10 within expression: contains(env.fullySupportedScalaVersions, matrix.scalaVersion) .github/workflows/main.yml (Line: 38, Col: 24): Unexpected value '${{ contains(env.fullySupportedScalaVersions, matrix.scalaVersion) }}'
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the validation error from .github/workflows/main.yml using an expression in continue-on-error that references env.fullySupportedScalaVersions. Start by tracing how that workflow expression is validated, then verify that the environment variable can be used with matrix.scalaVersion. Done means the workflow is accepted and the expression evaluates as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100