From b8b6e8713073b8342f0fbe14da8f3096cef4f62a Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Fri, 8 Sep 2023 17:34:08 +0300 Subject: [PATCH] Use each k3s version only once Signed-off-by: Dimitris Karakasilis --- .github/workflows/image-arm.yaml | 2 +- .github/workflows/release-arm.yaml | 2 +- .github/workflows/release.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-arm.yaml b/.github/workflows/image-arm.yaml index 93baf6928..489df5353 100644 --- a/.github/workflows/image-arm.yaml +++ b/.github/workflows/image-arm.yaml @@ -47,7 +47,7 @@ jobs: chmod +x luet sudo mv luet /usr/bin/luet # Construct an array like this from the found versions: - sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version)' > k3s_versions.json + sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version) | unique' > k3s_versions.json # Create a combination of flavors and k3s versions. content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true")) | map(select(.standard == "true"))' .github/flavors-arm.json k3s_versions.json) # the following lines are only required for multi line json diff --git a/.github/workflows/release-arm.yaml b/.github/workflows/release-arm.yaml index 2f81f158f..3bddc7cf4 100644 --- a/.github/workflows/release-arm.yaml +++ b/.github/workflows/release-arm.yaml @@ -39,7 +39,7 @@ jobs: chmod +x luet sudo mv luet /usr/bin/luet # Construct an array like this from the found versions: - sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version)' > k3s_versions.json + sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version) | unique' > k3s_versions.json # Create a combination of flavors and k3s versions. content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true")) | map(select(.standard == "true"))' .github/flavors-arm.json k3s_versions.json) # the following lines are only required for multi line json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5b82af8db..dbeb4e2c1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -44,7 +44,7 @@ jobs: chmod +x luet sudo mv luet /usr/bin/luet # Construct an array like this from the found versions: - sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version)' > k3s_versions.json + sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version) | unique' > k3s_versions.json content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true")) | map(select(.standard == "true"))' .github/flavors.json k3s_versions.json) # the following lines are only required for multi line json content="${content//'%'/'%25'}"