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

Move to moving tag instead of uses: ddev/[email protected] ? #11

Closed
rfay opened this issue Aug 21, 2023 · 9 comments
Closed

Move to moving tag instead of uses: ddev/[email protected] ? #11

rfay opened this issue Aug 21, 2023 · 9 comments

Comments

@rfay
Copy link
Member

rfay commented Aug 21, 2023

Most add-ons are configured with a moving tag, like @v0.4 or something. Could we move to that? Right now, the suggestion in the README means that people will have to do updates all the time (or dependabot can do it, but it's not enabled everywhere)

@julienloizelet
Copy link
Collaborator

julienloizelet commented Aug 21, 2023

Yes, I was thinking the same when I looked at the well known checkout action.

I never used such a moving tag. If I understand correctly, each time we create a release vX.y.z, we should remove and re-create a vX tag , am I right ?

If it's right, I guess I can work on the "Create release" action to do that automatically on each release. (maybe with some inspiration from https://github.com/actions/checkout/blob/main/.github/workflows/update-main-version.yml)

What do you think ?

Thanks

@rfay
Copy link
Member Author

rfay commented Aug 21, 2023

No, I don't think you have to do anything like that. You just tell people to use @v0.4 or maybe @v1 and it just uses the latest v1.

For example, https://github.com/ddev/ddev/blob/5654135a486d99f835ac512f7cb3b13611c207b7/.github/workflows/tests.yml#L111

There we have actions/cache configured for v1. They don't have to do anything but create a new release in v1, and we don't have to do anything because we'll just get it.

@julienloizelet
Copy link
Collaborator

julienloizelet commented Aug 21, 2023

I think there is something I don't understand.

They don't have to do anything but create a new release in v1

If we look at the cache action tags https://github.com/actions/cache/tags, we see that each time a new vX.y.z release is published, the main vX tag is also updated. This way, there is no diff between the last vX.y.z and the vX tag (actions/cache@v1.2.1...v1 for example)

I don't know how there are doing that. The checkout action repo seems to use some manual git push origin vX --force workflow : https://github.com/actions/checkout/blob/main/.github/workflows/update-main-version.yml#L31

in other words, for me, they are doing 2 things:

  • create a release vX.y.z
  • update the vX tag

@julienloizelet
Copy link
Collaborator

Maybe I just understood something:

You just tell people to use @v0.4 or maybe @v1 and it just uses the latest v1

Maybe I'm wrong, but you suppose here that GitHub is as powerful as composer or other package manager.
But it is not the case: using @v1 won't point to the last @v1.y.z tag.

Indeed, if we look at the GitHub documentation:
https://docs.github.com/en/actions/creating-actions/about-custom-actions#using-tags-for-release-management

we have to

Move the major version tag (such as v1, v2) to point to the Git ref of the current release.

after creating a release vX.y.z.

Will work on this asap.

Thanks

@rfay
Copy link
Member Author

rfay commented Aug 21, 2023

Move the major version tag (such as v1, v2) to point to the Git ref of the current release. For more information, see "Git basics - tagging."

I never knew that. Thought they were being much fancier than that. But at least the consumer doesn't have to do anything.

@tyler36
Copy link

tyler36 commented Aug 21, 2023

Will be another great addition

@julienloizelet
Copy link
Collaborator

Will be another great addition

I'm working on it :)

@julienloizelet
Copy link
Collaborator

Hi,

I updated the "Create release" workflow.

Now, it updates or creates a major tag (vX) after a vX.y.z release).

As an example, this run published a v0.6.0 release and created the v0 tag)

I think I can close this one.

Thanks

@tyler36
Copy link

tyler36 commented Aug 21, 2023

Confirmed working on tyler36/ddev-tink with v0 tag.

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

3 participants