Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote action not resolving version as github #101

Closed
fennecdjay opened this issue Feb 25, 2020 · 7 comments
Closed

Remote action not resolving version as github #101

fennecdjay opened this issue Feb 25, 2020 · 7 comments

Comments

@fennecdjay
Copy link

I not quite sure the title is clear, however I hope the example does a better jib at explaining the problem.
In some of my workflows, I have

use: fennecdjay/gwion-action@v1

It works fine on github, but when running with act, it complains about not finding the reference (it this case, ther is no v1, but github resolves it to the existing v1.0).

I looked at the code to see if I could find something helpful, but didn't find anything.

Looks like (this go library)[https://github.com/hashicorp/go-version] could do name resolving if we feed it the list of releases.

@cplee
Copy link
Contributor

cplee commented Feb 25, 2020

I see that repo has a v1 branch and a v1.0 tag. Which are you expecting to be picked up, the tag or the branch?

@fennecdjay
Copy link
Author

fennecdjay commented Feb 25, 2020

Github picks v1.0, and would pick v1.1 if found.
So that's what I would expect from act.
IMHO, that's what we should be expecting (I understand act as a local github action runner, so I suppose it should behave like github).


EDIT:
I think github targets releases first.

@cplee
Copy link
Contributor

cplee commented Feb 25, 2020

Looks like GitHub has some code to pick defaults based on the situation you have here...but that isn't documented. The way they recommend versioning here is to use semver for each release, and UPDATE your major version tag (e.g. v1) to point to the new semver release.

So, in this case you ought to update your releases to be semver (e.g. v1.0.1) and update your action to NOT have a v1 branch and instead to have a v1 tag that points to the commit of v1.0.1.

See setup-python as a good example

@fennecdjay
Copy link
Author

Thank you for the clarification!
Sorry it was my bad and not an act issue.

I'm closing this issue.

@wagenet
Copy link

wagenet commented May 13, 2020

@cplee While this definitely seems to be the recommendation, it seems like act should follow what GitHub actually does. ruby/setup-ruby doesn't follow the recommendations, but it does work with GitHub Actions and not with act. I've filed an issue, but I don't control the repo so I have no timeline on when/if it will be resolved. ruby/setup-ruby#55

@eregon
Copy link

eregon commented May 13, 2020

I think a moving tag is a git anti-pattern, and so I would recommend to handle v1 being either a branch or a tag (they are both git refs, and they both work with git clone --branch REF).

@eregon
Copy link

eregon commented May 13, 2020

I opened a new issue since this one was closed and the early discussion wasn't clear: #234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants