runner/.forgejo/labelscompare.py

25 lines
973 B
Python
Raw Normal View History

import json
expectedLabels = {
"maintainer": "contact@forgejo.org",
"org.opencontainers.image.authors": "Forgejo",
"org.opencontainers.image.url": "https://forgejo.org",
"org.opencontainers.image.documentation": "https://forgejo.org/docs/latest/admin/actions/#forgejo-runner",
"org.opencontainers.image.source": "https://code.forgejo.org/forgejo/runner",
"org.opencontainers.image.version": "1.2.3",
"org.opencontainers.image.vendor": "Forgejo",
chore: change the license to GPLv3-or-later (#773) The Forgejo runner is part of the Forgejo project. The licensing agreement in the governance repository reads like this: > Forgejo accepts contributions compatible with the GPLv3-or-later license. > The license under which Forgejo is distributed will be changed upon the acceptance of such contributions. The first step is to update the LICENSE file to reflect that decision. The individual copyright notice of each source file will be updated when and if relevant. If a change is made that is eligible for copyright, the author may decide change the copyright notice from MIT or Apache 2 to GPLv3-or-later. Refs licensing agreement https://codeberg.org/forgejo/governance/src/commit/6eb522282f606f65c77b83b662b008aaf444dcfb/AGREEMENTS.md#licensing Refs blog post about the licensing agreement https://forgejo.org/2024-08-gpl/ <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - other - [PR](https://code.forgejo.org/forgejo/runner/pulls/773): <!--number 773 --><!--line 0 --><!--description Y2hvcmU6IGNoYW5nZSB0aGUgbGljZW5zZSB0byBHUEx2My1vci1sYXRlcg==-->chore: change the license to GPLv3-or-later<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/773 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Gusted <gusted@noreply.code.forgejo.org> Reviewed-by: Beowulf <beowulf@noreply.code.forgejo.org> Reviewed-by: pat-s <pat-s@noreply.code.forgejo.org> Reviewed-by: fnetX <fnetx@noreply.code.forgejo.org> Reviewed-by: 0ko <0ko@noreply.code.forgejo.org> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-09-04 09:26:12 +00:00
"org.opencontainers.image.licenses": "GPL-3.0-or-later",
"org.opencontainers.image.title": "Forgejo Runner",
"org.opencontainers.image.description": "A runner for Forgejo Actions.",
}
inspect = None
with open("./labels.json", "r") as f:
inspect = json.load(f)
assert inspect
labels = inspect[0]["Config"]["Labels"]
for k, v in expectedLabels.items():
assert k in labels, f"'{k}' is missing from labels"
assert labels[k] == v, f"expected {v} in key {k}, found {labels[k]}"