From 9ab99964b3dc54a59e64a8022fc9edc186152165 Mon Sep 17 00:00:00 2001 From: Russell Troxel Date: Wed, 13 Mar 2024 09:44:38 -0700 Subject: [PATCH] Fix #941: omit tags from README to minimize spam (#980) * Fix #941: omit tags from README to minimize spam Signed-off-by: Russell Troxel * Re-render readme with proper env vars Signed-off-by: Russell Troxel --------- Signed-off-by: Russell Troxel --- .github/scripts/render-readme.py | 25 +---------- .github/scripts/templates/README.md.j2 | 10 ++--- README.md | 58 +++++++++++++------------- 3 files changed, 33 insertions(+), 60 deletions(-) diff --git a/.github/scripts/render-readme.py b/.github/scripts/render-readme.py index 7cf222ae4..4bf9a9398 100644 --- a/.github/scripts/render-readme.py +++ b/.github/scripts/render-readme.py @@ -28,25 +28,6 @@ def load_metadata_file(file_path): return load_metadata_file_yaml(file_path) return None -def get_latest_image(name): - r = requests.get( - f"https://api.github.com/users/{repo_owner}/packages/container/{name}/versions", - headers={ - "Accept": "application/vnd.github.v3+json", - "Authorization": "token " + os.environ["GITHUB_TOKEN"] - }, - ) - if r.status_code != 200: - print(f"Failed to get versions for {name}: {r.status_code}: {r.text}") - return None - data = r.json() - for image in data: - tags = image["metadata"]["container"]["tags"] - if "rolling" in tags: - return image - print(f"Couldn't find latest tag for {name}") - return None - if __name__ == "__main__": base_images = [] app_images = [] @@ -64,13 +45,9 @@ def get_latest_image(name): image = { "name": name, "channel": channel["name"], - "html_url": "", + "html_url": f"https://github.com/{repo_name}/pkgs/container/{name}", "owner": repo_owner } - gh_data = get_latest_image(name) - if gh_data is not None: - image["html_url"] = f"https://github.com/{repo_name}/pkgs/container/{name}" - image["tags"] = sorted(gh_data["metadata"]["container"]["tags"]) if meta["base"]: base_images.append(image) else: diff --git a/.github/scripts/templates/README.md.j2 b/.github/scripts/templates/README.md.j2 index f5f9c4195..6353fb996 100644 --- a/.github/scripts/templates/README.md.j2 +++ b/.github/scripts/templates/README.md.j2 @@ -65,14 +65,10 @@ For applications that need to have persistent configuration data the config volu Each Image will be built with a `rolling` tag, along with tags specific to it's version. Available Images Below -Container | Channel | Image | Latest Tags ---- | --- | --- | --- +Container | Channel | Image +--- | --- | --- {% for image in app_images | sort(attribute="name") -%} -[{{ image.name }}]({{ image.html_url }}) | {{ image.channel }} | ghcr.io/{{ image.owner }}/{{ image.name }} | -{%- set space = joiner(" ") -%} -{%- for tag in image.tags -%} -{{ space() }}![{{ tag }}](https://img.shields.io/badge/{{ tag.replace("-", "--") }}-{% if tag == "latest" %}green{% else %}blue{% endif %}?style=flat-square) -{%- endfor %} +[{{ image.name }}]({{ image.html_url }}) | {{ image.channel }} | ghcr.io/{{ image.owner }}/{{ image.name }} {% endfor %} ## Contributing diff --git a/README.md b/README.md index 4e03dcb41..8ecee1f68 100644 --- a/README.md +++ b/README.md @@ -65,35 +65,35 @@ For applications that need to have persistent configuration data the config volu Each Image will be built with a `rolling` tag, along with tags specific to it's version. Available Images Below -Container | Channel | Image | Latest Tags ---- | --- | --- | --- -[actions-runner](https://github.com/onedr0p/containers/pkgs/container/actions-runner) | stable | ghcr.io/onedr0p/actions-runner |![2](https://img.shields.io/badge/2-blue?style=flat-square) ![2.314](https://img.shields.io/badge/2.314-blue?style=flat-square) ![2.314.1](https://img.shields.io/badge/2.314.1-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[bazarr](https://github.com/onedr0p/containers/pkgs/container/bazarr) | stable | ghcr.io/onedr0p/bazarr |![1](https://img.shields.io/badge/1-blue?style=flat-square) ![1.4](https://img.shields.io/badge/1.4-blue?style=flat-square) ![1.4.2](https://img.shields.io/badge/1.4.2-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[home-assistant](https://github.com/onedr0p/containers/pkgs/container/home-assistant) | stable | ghcr.io/onedr0p/home-assistant |![2024.3.0](https://img.shields.io/badge/2024.3.0-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[jbops](https://github.com/onedr0p/containers/pkgs/container/jbops) | stable | ghcr.io/onedr0p/jbops |![1](https://img.shields.io/badge/1-blue?style=flat-square) ![1.0](https://img.shields.io/badge/1.0-blue?style=flat-square) ![1.0.893](https://img.shields.io/badge/1.0.893-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[lidarr](https://github.com/onedr0p/containers/pkgs/container/lidarr) | master | ghcr.io/onedr0p/lidarr |![2](https://img.shields.io/badge/2-blue?style=flat-square) ![2.1](https://img.shields.io/badge/2.1-blue?style=flat-square) ![2.1.7](https://img.shields.io/badge/2.1.7-blue?style=flat-square) ![2.1.7.4030](https://img.shields.io/badge/2.1.7.4030-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[lidarr-develop](https://github.com/onedr0p/containers/pkgs/container/lidarr-develop) | develop | ghcr.io/onedr0p/lidarr-develop |![2](https://img.shields.io/badge/2-blue?style=flat-square) ![2.2](https://img.shields.io/badge/2.2-blue?style=flat-square) ![2.2.1](https://img.shields.io/badge/2.2.1-blue?style=flat-square) ![2.2.1.4073](https://img.shields.io/badge/2.2.1.4073-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[lidarr-nightly](https://github.com/onedr0p/containers/pkgs/container/lidarr-nightly) | nightly | ghcr.io/onedr0p/lidarr-nightly |![2](https://img.shields.io/badge/2-blue?style=flat-square) ![2.2](https://img.shields.io/badge/2.2-blue?style=flat-square) ![2.2.3](https://img.shields.io/badge/2.2.3-blue?style=flat-square) ![2.2.3.4095](https://img.shields.io/badge/2.2.3.4095-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[par2cmdline-turbo](https://github.com/onedr0p/containers/pkgs/container/par2cmdline-turbo) | stable | ghcr.io/onedr0p/par2cmdline-turbo |![1.1.1](https://img.shields.io/badge/1.1.1-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[plex](https://github.com/onedr0p/containers/pkgs/container/plex) | stable | ghcr.io/onedr0p/plex |![1.40.0.7998-c29d4c0c8](https://img.shields.io/badge/1.40.0.7998--c29d4c0c8-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[plex-beta](https://github.com/onedr0p/containers/pkgs/container/plex-beta) | beta | ghcr.io/onedr0p/plex-beta |![1.40.1.8173-3e92df2db](https://img.shields.io/badge/1.40.1.8173--3e92df2db-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[postgres-init](https://github.com/onedr0p/containers/pkgs/container/postgres-init) | stable | ghcr.io/onedr0p/postgres-init |![16](https://img.shields.io/badge/16-blue?style=flat-square) ![16.2](https://img.shields.io/badge/16.2-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[prowlarr](https://github.com/onedr0p/containers/pkgs/container/prowlarr) | master | ghcr.io/onedr0p/prowlarr |![1](https://img.shields.io/badge/1-blue?style=flat-square) ![1.13](https://img.shields.io/badge/1.13-blue?style=flat-square) ![1.13.3](https://img.shields.io/badge/1.13.3-blue?style=flat-square) ![1.13.3.4273](https://img.shields.io/badge/1.13.3.4273-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[prowlarr-develop](https://github.com/onedr0p/containers/pkgs/container/prowlarr-develop) | develop | ghcr.io/onedr0p/prowlarr-develop |![1](https://img.shields.io/badge/1-blue?style=flat-square) ![1.14](https://img.shields.io/badge/1.14-blue?style=flat-square) ![1.14.1](https://img.shields.io/badge/1.14.1-blue?style=flat-square) ![1.14.1.4316](https://img.shields.io/badge/1.14.1.4316-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[prowlarr-nightly](https://github.com/onedr0p/containers/pkgs/container/prowlarr-nightly) | nightly | ghcr.io/onedr0p/prowlarr-nightly |![1](https://img.shields.io/badge/1-blue?style=flat-square) ![1.14](https://img.shields.io/badge/1.14-blue?style=flat-square) ![1.14.3](https://img.shields.io/badge/1.14.3-blue?style=flat-square) ![1.14.3.4326](https://img.shields.io/badge/1.14.3.4326-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[qbittorrent](https://github.com/onedr0p/containers/pkgs/container/qbittorrent) | stable | ghcr.io/onedr0p/qbittorrent |![4](https://img.shields.io/badge/4-blue?style=flat-square) ![4.6](https://img.shields.io/badge/4.6-blue?style=flat-square) ![4.6.3](https://img.shields.io/badge/4.6.3-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[qbittorrent-beta](https://github.com/onedr0p/containers/pkgs/container/qbittorrent-beta) | beta | ghcr.io/onedr0p/qbittorrent-beta |![4](https://img.shields.io/badge/4-blue?style=flat-square) ![4.6](https://img.shields.io/badge/4.6-blue?style=flat-square) ![4.6.3](https://img.shields.io/badge/4.6.3-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[radarr](https://github.com/onedr0p/containers/pkgs/container/radarr) | master | ghcr.io/onedr0p/radarr |![5](https://img.shields.io/badge/5-blue?style=flat-square) ![5.3](https://img.shields.io/badge/5.3-blue?style=flat-square) ![5.3.6](https://img.shields.io/badge/5.3.6-blue?style=flat-square) ![5.3.6.8612](https://img.shields.io/badge/5.3.6.8612-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[radarr-develop](https://github.com/onedr0p/containers/pkgs/container/radarr-develop) | develop | ghcr.io/onedr0p/radarr-develop |![5](https://img.shields.io/badge/5-blue?style=flat-square) ![5.4](https://img.shields.io/badge/5.4-blue?style=flat-square) ![5.4.1](https://img.shields.io/badge/5.4.1-blue?style=flat-square) ![5.4.1.8654](https://img.shields.io/badge/5.4.1.8654-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[radarr-nightly](https://github.com/onedr0p/containers/pkgs/container/radarr-nightly) | nightly | ghcr.io/onedr0p/radarr-nightly |![5](https://img.shields.io/badge/5-blue?style=flat-square) ![5.4](https://img.shields.io/badge/5.4-blue?style=flat-square) ![5.4.3](https://img.shields.io/badge/5.4.3-blue?style=flat-square) ![5.4.3.8673](https://img.shields.io/badge/5.4.3.8673-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[readarr-develop](https://github.com/onedr0p/containers/pkgs/container/readarr-develop) | develop | ghcr.io/onedr0p/readarr-develop |![0](https://img.shields.io/badge/0-blue?style=flat-square) ![0.3](https://img.shields.io/badge/0.3-blue?style=flat-square) ![0.3.19](https://img.shields.io/badge/0.3.19-blue?style=flat-square) ![0.3.19.2437](https://img.shields.io/badge/0.3.19.2437-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[readarr-nightly](https://github.com/onedr0p/containers/pkgs/container/readarr-nightly) | nightly | ghcr.io/onedr0p/readarr-nightly |![0](https://img.shields.io/badge/0-blue?style=flat-square) ![0.3](https://img.shields.io/badge/0.3-blue?style=flat-square) ![0.3.21](https://img.shields.io/badge/0.3.21-blue?style=flat-square) ![0.3.21.2457](https://img.shields.io/badge/0.3.21.2457-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[sabnzbd](https://github.com/onedr0p/containers/pkgs/container/sabnzbd) | stable | ghcr.io/onedr0p/sabnzbd |![4](https://img.shields.io/badge/4-blue?style=flat-square) ![4.2](https://img.shields.io/badge/4.2-blue?style=flat-square) ![4.2.3](https://img.shields.io/badge/4.2.3-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[sonarr](https://github.com/onedr0p/containers/pkgs/container/sonarr) | main | ghcr.io/onedr0p/sonarr |![4](https://img.shields.io/badge/4-blue?style=flat-square) ![4.0](https://img.shields.io/badge/4.0-blue?style=flat-square) ![4.0.2](https://img.shields.io/badge/4.0.2-blue?style=flat-square) ![4.0.2.1183](https://img.shields.io/badge/4.0.2.1183-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[sonarr-develop](https://github.com/onedr0p/containers/pkgs/container/sonarr-develop) | develop | ghcr.io/onedr0p/sonarr-develop |![4](https://img.shields.io/badge/4-blue?style=flat-square) ![4.0](https://img.shields.io/badge/4.0-blue?style=flat-square) ![4.0.2](https://img.shields.io/badge/4.0.2-blue?style=flat-square) ![4.0.2.1312](https://img.shields.io/badge/4.0.2.1312-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[tautulli](https://github.com/onedr0p/containers/pkgs/container/tautulli) | master | ghcr.io/onedr0p/tautulli |![2](https://img.shields.io/badge/2-blue?style=flat-square) ![2.13](https://img.shields.io/badge/2.13-blue?style=flat-square) ![2.13.4](https://img.shields.io/badge/2.13.4-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[theme-park](https://github.com/onedr0p/containers/pkgs/container/theme-park) | stable | ghcr.io/onedr0p/theme-park |![1](https://img.shields.io/badge/1-blue?style=flat-square) ![1.16](https://img.shields.io/badge/1.16-blue?style=flat-square) ![1.16.0](https://img.shields.io/badge/1.16.0-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) -[volsync](https://github.com/onedr0p/containers/pkgs/container/volsync) | stable | ghcr.io/onedr0p/volsync |![0](https://img.shields.io/badge/0-blue?style=flat-square) ![0.8](https://img.shields.io/badge/0.8-blue?style=flat-square) ![0.8.1](https://img.shields.io/badge/0.8.1-blue?style=flat-square) ![rolling](https://img.shields.io/badge/rolling-blue?style=flat-square) +Container | Channel | Image +--- | --- | --- +[actions-runner](https://github.com/onedr0p/containers/pkgs/container/actions-runner) | stable | ghcr.io/onedr0p/actions-runner +[bazarr](https://github.com/onedr0p/containers/pkgs/container/bazarr) | stable | ghcr.io/onedr0p/bazarr +[home-assistant](https://github.com/onedr0p/containers/pkgs/container/home-assistant) | stable | ghcr.io/onedr0p/home-assistant +[jbops](https://github.com/onedr0p/containers/pkgs/container/jbops) | stable | ghcr.io/onedr0p/jbops +[lidarr](https://github.com/onedr0p/containers/pkgs/container/lidarr) | master | ghcr.io/onedr0p/lidarr +[lidarr-develop](https://github.com/onedr0p/containers/pkgs/container/lidarr-develop) | develop | ghcr.io/onedr0p/lidarr-develop +[lidarr-nightly](https://github.com/onedr0p/containers/pkgs/container/lidarr-nightly) | nightly | ghcr.io/onedr0p/lidarr-nightly +[par2cmdline-turbo](https://github.com/onedr0p/containers/pkgs/container/par2cmdline-turbo) | stable | ghcr.io/onedr0p/par2cmdline-turbo +[plex](https://github.com/onedr0p/containers/pkgs/container/plex) | stable | ghcr.io/onedr0p/plex +[plex-beta](https://github.com/onedr0p/containers/pkgs/container/plex-beta) | beta | ghcr.io/onedr0p/plex-beta +[postgres-init](https://github.com/onedr0p/containers/pkgs/container/postgres-init) | stable | ghcr.io/onedr0p/postgres-init +[prowlarr](https://github.com/onedr0p/containers/pkgs/container/prowlarr) | master | ghcr.io/onedr0p/prowlarr +[prowlarr-develop](https://github.com/onedr0p/containers/pkgs/container/prowlarr-develop) | develop | ghcr.io/onedr0p/prowlarr-develop +[prowlarr-nightly](https://github.com/onedr0p/containers/pkgs/container/prowlarr-nightly) | nightly | ghcr.io/onedr0p/prowlarr-nightly +[qbittorrent](https://github.com/onedr0p/containers/pkgs/container/qbittorrent) | stable | ghcr.io/onedr0p/qbittorrent +[qbittorrent-beta](https://github.com/onedr0p/containers/pkgs/container/qbittorrent-beta) | beta | ghcr.io/onedr0p/qbittorrent-beta +[radarr](https://github.com/onedr0p/containers/pkgs/container/radarr) | master | ghcr.io/onedr0p/radarr +[radarr-develop](https://github.com/onedr0p/containers/pkgs/container/radarr-develop) | develop | ghcr.io/onedr0p/radarr-develop +[radarr-nightly](https://github.com/onedr0p/containers/pkgs/container/radarr-nightly) | nightly | ghcr.io/onedr0p/radarr-nightly +[readarr-develop](https://github.com/onedr0p/containers/pkgs/container/readarr-develop) | develop | ghcr.io/onedr0p/readarr-develop +[readarr-nightly](https://github.com/onedr0p/containers/pkgs/container/readarr-nightly) | nightly | ghcr.io/onedr0p/readarr-nightly +[sabnzbd](https://github.com/onedr0p/containers/pkgs/container/sabnzbd) | stable | ghcr.io/onedr0p/sabnzbd +[sonarr](https://github.com/onedr0p/containers/pkgs/container/sonarr) | main | ghcr.io/onedr0p/sonarr +[sonarr-develop](https://github.com/onedr0p/containers/pkgs/container/sonarr-develop) | develop | ghcr.io/onedr0p/sonarr-develop +[tautulli](https://github.com/onedr0p/containers/pkgs/container/tautulli) | master | ghcr.io/onedr0p/tautulli +[theme-park](https://github.com/onedr0p/containers/pkgs/container/theme-park) | stable | ghcr.io/onedr0p/theme-park +[volsync](https://github.com/onedr0p/containers/pkgs/container/volsync) | stable | ghcr.io/onedr0p/volsync ## Contributing