From e3b3910e1fac404e271120bc5429c9e13985f531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Thu, 22 Feb 2024 13:41:37 +0100 Subject: [PATCH] Sort the list of repositories by name --- .github/workflows/tech_radar.yml | 2 +- techRadar/used_languages.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tech_radar.yml b/.github/workflows/tech_radar.yml index a0ef54c..62a3f42 100644 --- a/.github/workflows/tech_radar.yml +++ b/.github/workflows/tech_radar.yml @@ -34,7 +34,7 @@ jobs: - name: Update the list of used languages run: > echo ${{ toJSON(steps.repository_list.outputs.repository_list_json) }} - | jq '. | reduce .[] as { $name, $primaryLanguage, $url } ( {}; .[ $primaryLanguage.name | tostring ] += [ { name: $name, url: $url } ] )' + | jq '. | reduce .[] as { $name, $primaryLanguage, $url } ( {}; .[ $primaryLanguage.name | tostring ] += { $name: $url } )' | gomplate -d repositories=stdin:///in.json -f techRadar/used_languages.tmpl -o public/techRadar/used_languages.md - name: Commit the list of changes diff --git a/techRadar/used_languages.tmpl b/techRadar/used_languages.tmpl index a12839e..b45f00d 100644 --- a/techRadar/used_languages.tmpl +++ b/techRadar/used_languages.tmpl @@ -3,7 +3,7 @@ {{ range $language, $repositories := (ds "repositories") -}} ## {{ if eq $language "null" }}Unknown{{ else }}{{ $language }}{{ end }} -{{ range $repository := $repositories -}} -- [{{ $repository.name }}]({{ $repository.url }}) +{{ range $name, $url := $repositories -}} +- [{{ $name }}]({{ $url }}) {{ end }} {{ end -}}