The intention was good initially but the expression was wrong for two
reasons:
* When a pull_request event is received for a labeled action, the
match should be github.event.action == 'label_updated' and not
'labeled'
* The event does not have a github.event.label field and
contains(github.event.label.name, 'backport/v') will always be
false.
Since the expression is only evaluated in the context of a merged pull
request, either because it was just closed or because it was labeled
after the fact, the only verification that is needed is to assert that
there is at least one `backport/v*` label.
strategy: ort
The strategy is changed from "recursive" to "ort", which is the
default for git >= 2.43.2 and claims to reduce the likelyhood of
conflicts according to man git-merge:
> This has been reported to result in fewer merge conflicts without
> causing mismerges...
strategy-option: find-renames
The default option are the same for both strategies and "theirs" will:
> This option forces conflicting hunks to be auto-resolved
> cleanly by favoring their version.
"their" being whatever is not in the commits being cherry-picked.
In the context of Forgejo backports, this is not what is desired:
whenever a conflict happens it needs to be manually resolved and
prefering whatever is in the stable branch will not lead to a sane
backport.
It is changed back to "find-renames" which is documented to be the
default:
> Turn on rename detection, optionally setting the similarity
> threshold. This is the default.
Fixes: https://codeberg.org/forgejo/forgejo/issues/2886
Now that Forgejo has its own release number, use the Makefile as a
reference.
Also document and improve support for debugging this
pull_request_target workflow by using a branch in the repository.
Now that semantic versions are used, the major version must be used
instead of major.minor to distinguish releases with breaking changes.
Before:
Forgejo v1.21.1-0, tags 1.21.1-0 and 1.21
Forgejo v1.21.2-0, tags 1.21.2-0 and 1.21
Forgejo v1.22.1-0, tags 1.22.1-0 and 1.22
After
Forgejo v7.0.0 tags 7.0.0 and 7
Forgejo v7.0.1 tags 7.0.1 and 7
Forgejo v7.1.2 tags 7.1.2 and 7
Forgejo v8.0.1 tags 8.0.1 and 8
Also ignore the *-test tags when figuring out the Forgejo version,
they exist in the integration repository and experimental repository
for daily releases.
The release name, as provided by FORGEJO_RELEASE, is used to build OCI
images and binary files. Although it can be the same as the Forgejo
version, it is not a requirement.
When the FORGEJO_RELEASE environment variable is set, use it as a
default for naming the binary file instead of FORGEJO_VERSION. For
instance, when building from the forgejo branch here is what is desired:
FORGEJO_VERSION=7.0.0-g2343
GITEA_VERSION=1.22.0
VERSION=vforgejo-test
The name of the release is also displayed with forgejo --version
for sanity check purposes.
Before:
FORGEJO_VERSION is the computed version
GITEA_VERSION is set manually
VERSION defaults to FORGEJO_VERSION
forgejo --help does not display VERSION
After:
FORGEJO_VERSION is the computed version
GITEA_VERSION is set manually
RELEASE_VERSION defaults to FORGEJO_VERSION
VERSION defaults to RELEASE_VERSION
forgejo --help displays VERSION
* forgejo & v*/forgejo branches are mirrored to the forgejo-integration repository on every commit
* re-build a test release every time that happens
* forogejo => vforgejo-test
* v1.21/forgejo => v1.21-test
* v1.22/forgejo => v1.22-test
* etc.
(cherry picked from commit ded1f27ebb)
(cherry picked from commit e452b18455)
[CI] upload the forgejo under test as an artifact for end-to-end (squash) use forgejo-pr
cascade a PR to https://code.forgejo.org/forgejo/end-to-end on the
forgejo-pr branch which will only run end-to-end tests relevant to a
Forgejo PR and not the entire end-to-end suite.
(cherry picked from commit 011de92174)
(cherry picked from commit 50290011b2)
[CI] upload the forgejo under test as an artifact for end-to-end (squash) after build
(cherry picked from commit ba35f42e3d)
(cherry picked from commit ddf43faecb)
[CI] upload the forgejo under test as an artifact for end-to-end (squash) do not display env
(cherry picked from commit d186ec3db4)
(cherry picked from commit 20e9d4bffb)
[CI] upload the forgejo under test as an artifact for end-to-end (squash) merge feature branches
(cherry picked from commit 83cd7a3ad9)
(cherry picked from commit 75fd819ee5)
(cherry picked from commit c6d0216929)
(cherry picked from commit 4a0ee31376)
(cherry picked from commit 5f440052fb)
(cherry picked from commit e603cd3dcf)
(cherry picked from commit f1c5e86d83)
- Currently the collected coverage is not being used by the CI, so use
the non-coverage variant to not have the overhead of collecting
coverage.
(cherry picked from commit 9b3032c14b)
(cherry picked from commit b0fded409d)
(cherry picked from commit 14b5efb1c4)
(cherry picked from commit 30bd28eed3)
(cherry picked from commit 54bb708ce7)
(cherry picked from commit f1664c360b)
(cherry picked from commit cd8648178d)
(cherry picked from commit 69894fbc82)
(cherry picked from commit 314ae5e183)