facebook / pyre-action

GitHub Action for Pyre
MIT License
17 stars 11 forks source link

Error: the uses attribute must be a path, a Docker image, or owner/repo@ref #2

Closed mrBen closed 1 year ago

mrBen commented 1 year ago

When copying the action strait from the README, I get the following error:

Error: .github#L1 the `uses' attribute must be a path, a Docker image, or owner/repo@ref

I solved it in my case by adding @main at the end of the line uses: facebook/pyre-action.

I think the relevent documentation is here: Workflow syntax for GitHub Actions, but I'm not sure what would be the best fixes. It seems that no ref can work if the action is in the repo, which is not the case for me as a simple consumer of the action. Adding @main is fine for me but as I understand it might be a security issue for more serious consumers, you might want to provide a version number, but I have no idea how to do that.

mrBen commented 1 year ago

Ah! I see that when copying the action from the marketplace, it gives the line: uses: facebook/pyre-action@v0.0.1.

connernilsen commented 1 year ago

Hey @mrBen, thanks for submitting the issue to us!

I'll see if I can add an explanation there to make it more clear that @v0.0.1 will be added or the user can select a different version to use. Do you think that would be a good solution here?

mrBen commented 1 year ago

Given that there is actually a version (I hadn’t notice when I opened the issue), I was just thinking of adding the version in the README usage, so if someone (like me) just copy and paste the README without going to the marketplace, it works right away.

But of course I’m all for adding more explanations if you think they can help. I don’t have enough knowledge to add them myself through.