【发布时间】:2021-12-28 19:38:49
【问题描述】:
如果我的 github 操作工作流 yaml 中有以下部分:
env:
fullySupportedScalaVersions: "2.13.6"
test:
runs-on: ubuntu-latest
continue-on-error: ${{ contains(env.fullySupportedScalaVersions, matrix.scalaVersion) }}
我收到如下错误消息:
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) }}'
我该如何解决或规避这个问题?
在以下工作流程中观察到上述情况: https://github.com/tek/splain/blob/6b12e57954aae0852e9b948e12ef5637c478b53d/.github/workflows/main.yml
【问题讨论】:
标签: github continuous-integration github-actions