Skip to content

Conversation

@davereid
Copy link
Collaborator

@davereid davereid commented May 8, 2025

The Issue

The v1 tag that we have that is always updated should only really be updated when a new release is made, and not on every push to main.

How This PR Solves The Issue

Updates the workflow to use https://github.com/tj-actions/release-tagger to update the v1 release. This also reduces our custom code.

Manual Testing Instructions

None

Automated Testing Overview

None

Related Issue Link(s)

Release/Deployment Notes

None, this is an internal workflow change only.

@davereid davereid requested a review from jonaseberle as a code owner May 8, 2025 15:29
@rfay
Copy link
Member

rfay commented Sep 8, 2025

Needs quick rebase and review by @jonaseberle or @stasadev

@stasadev stasadev force-pushed the update-release-workflow branch from 6338e7b to 8ec8f19 Compare September 8, 2025 17:01
Copy link
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it worked as expected.

I created a fork, merged this branch into main, created a release. It failed, because it goes through each tag, checks for release for each tag to retrieve description.

(This repo has 6 releases and 22 tags - so adding tj-actions/release-tagger will require to have releases for all tags.)

After that fail, I removed all tags in my fork except v1.10.1 and v1, created a release for v1.10.1 (because forks don't copy any releases from parent repos), and tried to create a new release v1.10.2.

It worked, this action successfully added a new release for v1 tag, updated its description and marked it as the latest one.

But, I didn't see a moved tag for v1, it remained on the same git commit as v1.10.1.

Copy link
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggested change worked for me.
I used the same technique as in the action example.

(And we still need to create releases for all tags.)

@jonaseberle
Copy link
Member

We shall have tag+release for all upcoming releases (the older tags stasadev found are from the previous repository and we have not added releases for them).

But I think @stasadev's change makes sense because AFAIK for Github action versioning, only the tags are important.

I'll resolve the conflict with the previous commit, then we can commit and try for our next release.

@jonaseberle
Copy link
Member

Thanks!

@jonaseberle jonaseberle merged commit 323f5d3 into main Sep 23, 2025
8 checks passed
@jonaseberle jonaseberle deleted the update-release-workflow branch September 23, 2025 06:45
@jonaseberle
Copy link
Member

jonaseberle commented Sep 23, 2025

There was a problem now when I tagged and pushed the last commit (v1.11.0) with this action. Please see https://github.com/ddev/github-action-setup-ddev/actions/runs/17938026489/job/51007856890

Problem was I could also not move the tag manually now!

So somebody please move/re-tag the existing v1 to the last commit.
(It is unfortunate that they require us to do so but AFAIK it is still what needs to be done for making the @v1 "version" constraint available to be used.)

This is what happened for me:

$ git tag v1 --force
Updated tag 'v1' (was 1c7ef18)
$ git push --tags
To github.com:ddev/github-action-setup-ddev.git
 ! [rejected]        v1 -> v1 (already exists)
error: failed to push some refs to 'github.com:ddev/github-action-setup-ddev.git'
hint: Updates were rejected because the tag already exists in the remote.
$ git push --delete origin v1
remote: error: GH013: Repository rule violations found for refs/tags/v1.
remote: Review all repository rules at https://github.com/ddev/github-action-setup-ddev/rules?ref=refs%2Ftags%2Fv1
remote: 
remote: - Cannot delete this tag
remote: 
To github.com:ddev/github-action-setup-ddev.git
 ! [remote rejected] v1 (push declined due to repository rule violations)
error: failed to push some refs to 'github.com:ddev/github-action-setup-ddev.git'

The mentioned https://github.com/ddev/github-action-setup-ddev/rules?ref=refs%2Ftags%2Fv1 has some ruleset on that tag? I have no rights to adjust there and no idea what it means.

I tried to delete v1 via the GUI:

https://github.com/ddev/github-action-setup-ddev/releases/tag/v1 does not allow me to click "delete":
image

@stasadev
Copy link
Member

Hi @jonaseberle,

The mentioned ddev/github-action-setup-ddev/rules?ref=refs%2Ftags%2Fv1 has some ruleset on that tag? I have no rights to adjust there and no idea what it means.

Yes, that is our org rule, added as part of:

It was originally only for ddev/ddev, and I thought it would be useful everywhere, but it turns out that was not a good idea.

I changed the rule back to repository level in ddev/ddev.

@stasadev
Copy link
Member

stasadev commented Sep 23, 2025

If that makes sense, I'd just remove tags that don't have releases (except v1) and rerun the release action.

(Or make a release for every existing tag, except v1 - the action will do that automatically.)

@stasadev
Copy link
Member

I removed tags that aren't listed here https://github.com/marketplace/actions/setup-ddev-in-github-workflows

And re-started the failed workflow, it created a new release v1, but the tag was not moved. probably because it failed at first, I moved the tag manually.

@jonaseberle
Copy link
Member

wonderful, thank you @stasadev!

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

Successfully merging this pull request may close these issues.

5 participants