github / github/gh-actions-lock
Using $/abc in an action.yaml to point to another action in the same repo fails at execution time
- Dominant language
- Go
- Stars
- 49
- Forks
- 3
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 3
Description
See: https://github.com/jessehouwing/azdo-marketplace
There is a root action.yaml with too many options.
So I added a number of targeted action.yaml files in subfolders, like `package`, `publish` etc.
These used to target the full name of the action in the repo: `jessehouwing/azdo-marketplace@v6.2.1`.
I replaced this with `$/` so I don't have to update the yaml files every time I do a release and to simplify testing.
This works when executing the action *in the same repo*, but fails when calling it from another repo it seems. It only fails at execution time on the runner:
```plaintext
Error: jessehouwing\azdo-marketplace\v6.3.3\package\action.yaml (Line: 279, Col: 13): Expected format {org}/{repo}[/path]@ref. Actual '$/'
Error: System.FormatException: Input string was not in a correct format. Failure to parse near offset 96. Expected an ASCII digit.
at System.Text.ValueStringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ReadOnlySpan`1 args)
at System.String.FormatHelper(IFormatProvider provider, String format, ReadOnlySpan`1 args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at GitHub.Runner.Worker.TemplateTraceWriter.Error(String format, Object[] args)
at GitHub.DistributedTask.ObjectTemplating.TemplateContext.Error(Nullable`1 fileId, Nullable`1 line, Nullable`1 column, String message)
at GitHub.DistributedTask.ObjectTemplating.TemplateContext.Error(TemplateToken value, String message)
at GitHub.DistributedTask.Pipelines.ObjectTemplating.PipelineTemplateConverter.ConvertToStep(TemplateContext context, TemplateToken stepsItem, ReferenceNameBuilder nameBuilder)
at GitHub.DistributedTask.Pipelines.ObjectTemplating.PipelineTemplateConverter.ConvertToSteps(TemplateContext context, TemplateToken steps)
at GitHub.Runner.Worker.ActionManifestManagerLegacy.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
at GitHub.Runner.Worker.ActionManifestManagerLegacy.Load(IExecutionContext executionContext, String manifestFile)
```
Contributor guide
Research direction
Start with the linked jessehouwing/azdo-marketplace reproduction and inspect the root action.yaml plus the targeted package and publish action.yaml files, especially package/action.yaml at line 279. Run the action from both the same repository and another repository to compare parsing behavior. Done means the $/ reference is accepted when the action is called externally, or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 60/100