Cardinal-Cryptography / Cardinal-Cryptography/github-actions-validator
False positive error for action output
- 主要言語
- Go
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
On example on [this](https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/5356212949/jobs/9715455989) run:
> EA811: action create-featurenet step 5 Called step with id 'get-argocd-featurnet-app-name' output 'name' does not exist
EA811: action create-featurenet step 6 Called step with id 'get-argocd-featurnet-app-name' output 'name' does not exist
EA811: action create-featurenet step 8 Called step with id 'get-argocd-featurnet-app-name' output 'name' does not exist
EA811: action delete-featurenet step 6 Called step with id 'get-argocd-featurnet-app-name' output 'name' does not exist
EA811: action delete-featurenet step 9 Called step with id 'get-argocd-featurnet-app-name' output 'name' does not exist
This error comes from the below code
```yaml
- name: Get argocd featurenet app name
id: get-argocd-featurnet-app-name
shell: bash
env:
# yamllint disable-line rule:line-length
APP_NAME: ${{ inputs.featurenet-name != '' && inputs.featurenet-name || format('{0}{1}', 'fe-', steps.get-ref-properties.outputs.branch-name-for-argo) }}
run: |
echo "name=${{ env.APP_NAME }}" >> $GITHUB_OUTPUT
```
Most likely problem is that validator sees GH expression and cannot parse `name` identifier correctly.
[The workaround is:](https://github.com/Cardinal-Cryptography/aleph-node/pull/1266/commits/bd1783cef6fbf842f6a43200eae61ade8c22791c)
```yaml
- name: Get argocd featurenet app name
id: get-argocd-featurnet-app-name
shell: bash
env:
# yamllint disable-line rule:line-length
APP_NAME: ${{ inputs.featurenet-name != '' && inputs.featurenet-name || format('{0}{1}', 'fe-', steps.get-ref-properties.outputs.branch-name-for-argo) }}
run: |
name_local=${{ env.APP_NAME }}
echo "name=$name_local" >> $GITHUB_OUTPUT
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start by reproducing the reported EA811 diagnostics with the GitHub Actions YAML shown in the issue, then inspect the validator's handling of expressions used in action output assignments. Done means the shown workflow no longer produces false 'output does not exist' errors while genuinely missing outputs remain detectable.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- github-actions, go
- 領域
- ci-cd, devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100